prash1972
Computer
- Oct 26, 2005
- 1
I have the following scenario. A shell script writes the name of the directory (Example: 10-24-05) into a text file progress.txt. I have a VBA Macro reading this file to pick up the name of the directory to change to. I am using the following code to do this:
Open "I:\tests\progress.txt" For Input As #20
Line Input #20, ResultsDate
Close #20
DirPath = "K:\current\" + ResultsDate
ChDir DirPath
When I run this, I see an error saying the path was not found. But incase I assign ResultsDate = "10-24-05" instead of reading it from a file, that seems to work fine. Can anyone tell me what I might be doing wrong ?
Thanks !
Open "I:\tests\progress.txt" For Input As #20
Line Input #20, ResultsDate
Close #20
DirPath = "K:\current\" + ResultsDate
ChDir DirPath
When I run this, I see an error saying the path was not found. But incase I assign ResultsDate = "10-24-05" instead of reading it from a file, that seems to work fine. Can anyone tell me what I might be doing wrong ?
Thanks !