S simonlee11 Member Licensed User Longtime User Mar 4, 2011 #1 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
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
K kickaha Well-Known Member Licensed User Longtime User Mar 4, 2011 #2 simonlee11 said: 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 Click to expand... 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 said: 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 Click to expand... What is the error given? The code looks OK as long as material is a variable. Or did you want to insert "material"?
klaus Expert Licensed User Longtime User Mar 4, 2011 #3 You should tell us what error you get and what type of variable material is. I suppose that material is a numerical variable. Try Qtytxt .text = Qtytxt.text &" "& (material) Best regards. Upvote 0
You should tell us what error you get and what type of variable material is. I suppose that material is a numerical variable. Try Qtytxt .text = Qtytxt.text &" "& (material) Best regards.
S simonlee11 Member Licensed User Longtime User Mar 5, 2011 #4 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
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
K kickaha Well-Known Member Licensed User Longtime User Mar 5, 2011 #5 simonlee11 said: 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 Click to expand... And the error message is ???????????? Upvote 0
simonlee11 said: 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 Click to expand... And the error message is ????????????
klaus Expert Licensed User Longtime User Mar 5, 2011 #6 You should use: Qtytxt .text = Qtytxt.text &" some other text"& material If you want to add text which is not in a variable you must put it between quotes. Best regards. Upvote 0
You should use: Qtytxt .text = Qtytxt.text &" some other text"& material If you want to add text which is not in a variable you must put it between quotes. Best regards.
S simonlee11 Member Licensed User Longtime User Mar 5, 2011 #7 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
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
klaus Expert Licensed User Longtime User Mar 5, 2011 #8 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
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.
S simonlee11 Member Licensed User Longtime User Mar 9, 2011 #9 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
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:
K kickaha Well-Known Member Licensed User Longtime User Mar 10, 2011 #10 simonlee11 said: 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 Click to expand... 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
simonlee11 said: 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 Click to expand... 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.
S splatt Active Member Licensed User Longtime User Mar 10, 2011 #11 Another thing to check. Is it possible you have created another instanceof QtyLbl? Upvote 0
K kickaha Well-Known Member Licensed User Longtime User Mar 10, 2011 #12 splatt said: Another thing to check. Is it possible you have created another instanceof QtyLbl? Click to expand... Very, very good point:sign0142: I suggest you check this first. Upvote 0
splatt said: Another thing to check. Is it possible you have created another instanceof QtyLbl? Click to expand... Very, very good point:sign0142: I suggest you check this first.