Quote:
Originally Posted by Khwaja
I tried checking the file name and nothing happens after I added ?MyFileName in the immediate window.
|
Confirm the following:
1. you "Put a break point (or a
Stop instruction) directly
after this line (or its equivalent)"
2. That you left the yellow highlighting as it was (didn't stop the debugger).
3. That after 'adding' ?MyFileName you pressed
Enter on the keyboard.
If you still get nothing, there is a problem with assigning a value to
MyFileName.
Another way to check for a realistic filename is to forget all of the above and add a code line just after the line:
MyFileName = CurrentWB.Path & "\QBOUploads\" & Sheets("Analysis").Range("I1").Value & Format(Now(), "dd-mm-yyyy") & ".csv"
being:
MsgBox MyFileName
This will cause a message box to appear which will allow you to check the filename. Clicking the
OK button on the message box will allow the code to continue.