Basic String manipulation question

abhiutd

Registered User.
Local time
Today, 06:30
Joined
Jul 28, 2008
Messages
48
Hi,
How can i write the following string concatenation in a short form:
strValue = strValue & "Hello"

Tried strValue &= "Hello" but it doesn't work.

Please excuse me for my basic question but i am new to VB.

Thank You for your help.
 
Last edited:
I could be wrong but I think:

strValue = strValue & "Hello"

Is the best you can do in VBA. Isn't that '&=' a c+ or java thing?
 
Your question is a little confusing. Can you try and explain what it is that you are trying to do. If you are just trying to concatenate the variable strValue and the word hello in a text box than you can just set the form's on open event procedure and define strvalue and say

Dim strValue
strValue= "Frank"
[Your Text box Name Here]= strValue & "Hello"

Remember that if you want a space between the two words, just put the space before the word Hello ie, " Hello".
Hope this helps. Explain further if this isn't what you were trying to do.
Tyler
 
I could be wrong but I think:

strValue = strValue & "Hello"

Is the best you can do in VBA. Isn't that '&=' a c+ or java thing?

Ken nails it.

VBA doesn't really support such terse operation like that.
 

Users who are viewing this thread

Back
Top Bottom