writing a text file in the same folder as my program
Takashi Yamauchi wrote:
Is there any way I can place "TestData.txt" in the same folder as
my program is placed?
I don't know what is setting or varying the working directory in your
case. But here are some ideas so you can set it yourself right before
the write:
1. Assuming you want to set it to the directory of your .xls file you
can use ChDir Activeworkbook.path
2. If you really want to set it to the directory of the Excel
executable (excel.exe) you can use ChDir Application.path
|