I have a string variable that I would like to add 2 characters to the left side of the string. For example...
strServerName = myserver and I would like to change it to \\myserver.
What would be the best way to do this?
Thanks!
I have a string variable that I would like to add 2 characters to the left side of the string. For example...
strServerName = myserver and I would like to change it to \\myserver.
What would be the best way to do this?
Thanks!
Would this work for you?
vb Code:
strServerName = "\\" & myserver
Would this work for you?
Code:Dim myServer As String
myServer = "whatever"
If Left(Trim(myServer), 2) <> "\\" Then
myServer = "\\" & Trim(myServer)
End If
Of course... strServerName = "\\" & strServerName
I must not be thinking right today :)
Thanks for the help!