jerbell
asked on
take out spaces in path
i have this code in my program
Private Sub Form_Load()
picpath = "\\computer2\photo\"
Picture1.Picture = LoadPicture(picpath & Clipboard.GetText & ".jpg")
End Sub
Here is the problem clipbard.gettext may contain blank spaces and when i try to open the picture it doesent find it
it tries to open 1 .jpg instead of 1.jpg
I have to capture 7 caracters in the clipboard cause sometime i could have 1234567.jpg
is there a way to take out these blank spaces
Private Sub Form_Load()
picpath = "\\computer2\photo\"
Picture1.Picture = LoadPicture(picpath & Clipboard.GetText & ".jpg")
End Sub
Here is the problem clipbard.gettext may contain blank spaces and when i try to open the picture it doesent find it
it tries to open 1 .jpg instead of 1.jpg
I have to capture 7 caracters in the clipboard cause sometime i could have 1234567.jpg
is there a way to take out these blank spaces
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
but your is short and sweet didn't try it but will give you points since my code works
but if yours works all the better.
thanks