how can i add a "\" at the end of a string?
Printable View
how can i add a "\" at the end of a string?
string = string & "\"
To test if it is already there? If Right$(string, 1)="\" then it's there already
for some reason it isnt working?
are there some strings you just cant change?
Fixed length strings are one; also, if there is a vbNullChar (= Chr$(0)) in the string and you try to put it in a control the string will be cut, null characters are not allowed in most controls.
There can also be fixed length strings declared as Dim strMyString As String * 200
Constants can't be changed:Quote:
Originally Posted by damasterjo
Const myString As String = "asfasdf"
Fixed length strings can be changed but can't be made longer
Dim myString As String * 10 ' 10 characters only
myString = "1234567890\" will only be "1234567890"
You might want to post the line of code that is giving you problems and how it was declared, i.e., the DIM statement for that string.
gosh i hate programming sometimes, i fixed it ghetto style but i think it might work...