add text

simonlee11

Member
Licensed User
Longtime User
Hi all,
I am trying to add some text after a variable as follows
Qtytxt .text = qtytxt.text &" "& material

This inserts the space but i need to insert some more text after the space but it keeps coming up with an error any help please



Thanks
 

kickaha

Well-Known Member
Licensed User
Longtime User
Hi all,
I am trying to add some text after a variable as follows
Qtytxt .text = qtytxt.text &" "& material

This inserts the space but i need to insert some more text after the space but it keeps coming up with an error any help please



Thanks

What is the error given?
The code looks OK as long as material is a variable. Or did you want to insert "material"?
 
Upvote 0

simonlee11

Member
Licensed User
Longtime User
Material is a variable what i am trying to do is


Qtytxt.text = qtytxt.text &" "& some more text material

Where material is a variable i thought &"some other text "& would do it as this woks to insert the space but it dosnt.



Thanks
 
Upvote 0

kickaha

Well-Known Member
Licensed User
Longtime User
Material is a variable what i am trying to do is


Qtytxt.text = qtytxt.text &" "& some more text material

Where material is a variable i thought &"some other text "& would do it as this woks to insert the space but it dosnt.



Thanks

And the error message is ????????????
 
Upvote 0

simonlee11

Member
Licensed User
Longtime User
Sorry when i said an error i meant it dosnt work the line now reads as i have made some changes (it is now a dynamic label)

qtylab.text =qtylab.text &"m3"& material

but the m3 does not appear

Thanks for any help l realise this is basic stuff but we all have to start somewhere
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
Sorry, but we are turning in circle.
You must post the rest of the code and explain more in detail what you really want to do, so we could try to reproduce it and give you a concrete answer.
What do you mean with a 'dynamic Label' ?

Best regards.
 
Upvote 0

simonlee11

Member
Licensed User
Longtime User
Sorry guys dont mean to waste your time I was using a text box to show the result but it is now shown in the label thats what i meant by dynamic. The question was really about how to display text before or after any variable.

Thanks:sign0104:
 
Upvote 0

kickaha

Well-Known Member
Licensed User
Longtime User
Sorry when i said an error i meant it dosnt work the line now reads as i have made some changes (it is now a dynamic label)

qtylab.text =qtylab.text &"m3"& material

but the m3 does not appear

Thanks for any help l realise this is basic stuff but we all have to start somewhere

This should work, not sure why m3 does not appear.

Does the value of material get added, what happens if you remove the material part, or change "m3" to ""test"?

replace the line with qtylab.text =qtylab.text &"TEST" - does that work

Now try qtylab.text =qtylab.text & material - does that work

What about qtylab.text =qtylab.text &"m3"& "TEST"

What type of variable is material? try using a dummy variable of the same type eg (if material is a string:

Dim dummy as string
dummy = "DUMMY"
qtylab.text =qtylab.text &"m3"& dummy - working?

Don't worry about wasting peoples time, we do not have to respond but do so to help out.
 
Upvote 0

splatt

Active Member
Licensed User
Longtime User
Another thing to check.

Is it possible you have created another instanceof QtyLbl?
 
Upvote 0
Top