View Single Post
 
Old 09-06-2018, 05:07 AM
p45cal's Avatar
p45cal p45cal is offline Windows 10 Office 2016
Expert
 
Join Date: Apr 2014
Posts: 956
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

Quote:
Originally Posted by Khwaja View Post
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.
Reply With Quote