Checking a String's last character
dim myPath as string
mypath = "c:\folderpath"
if right(mypath,1) < "\" then
mypath = mypath & "\"
end if
Ren wrote:
I want to get a folder path from a a cell and have a check function where the
function would check if the string's last character is "\"
So that if the String is "C:\folderpath" the string would return
"C:\folderpath\" and leave it as is if the String is "C:\folderpath\"
What VBA function would allow me to do so?
--
Dave Peterson
|