G
Guest
Hi all
I have encountered a problem that has me stumped in extending a project that
I am currently working on. The MkDir code line fails every time unless I hard
code the Folder name in (not an option for the release version).
MkDir stPath & stSName <- Error 76 Path not Found
Where stPath = "G:\HR\CV's\JobshopCV's\"
and stSName is returned with the following:
MyPos = InStr(1, rg, SearchChar) - 1
MyPos2 = InStr(1, rg, SearchChar2) + 8
myVar = Left(rg, MyPos)
myVar2 = Right(myVar, MyPos - MyPos2)
stSName = Trim(myVar2)
The only thing that I can think of as being wrong is with the stSname
return, as I have tested this by hardcoding the final desired file path
(which works) and hardcoding the separate variables (also works)
Would the fact that the stSName Var returns the following eg affect this?
Debug.Print stSName < -- Returns "REZA " << note the space
Somehow Trim(myVar2) does not remove this?
Any ideas?
Thanks in advance
I have encountered a problem that has me stumped in extending a project that
I am currently working on. The MkDir code line fails every time unless I hard
code the Folder name in (not an option for the release version).
MkDir stPath & stSName <- Error 76 Path not Found
Where stPath = "G:\HR\CV's\JobshopCV's\"
and stSName is returned with the following:
MyPos = InStr(1, rg, SearchChar) - 1
MyPos2 = InStr(1, rg, SearchChar2) + 8
myVar = Left(rg, MyPos)
myVar2 = Right(myVar, MyPos - MyPos2)
stSName = Trim(myVar2)
The only thing that I can think of as being wrong is with the stSname
return, as I have tested this by hardcoding the final desired file path
(which works) and hardcoding the separate variables (also works)
Would the fact that the stSName Var returns the following eg affect this?
Debug.Print stSName < -- Returns "REZA " << note the space
Somehow Trim(myVar2) does not remove this?
Any ideas?
Thanks in advance