PDA

View Full Version : [SOLVED] Working with String in VBA



volabos
03-09-2013, 10:02 AM
Hi, let say I have a string:

MyString = "D:\dst"

Now I need to write a small VBA code which will check if there is any "\" in the last place of that string, and if it is there then it will remove that.

Can somebody help me how to write that?

Thanks and regards,

Paul_Hossler
03-09-2013, 10:29 AM
If Right(MyString,1) = "\" then MyString = Left(MyString, Len(MyString)-1)




Paul