Thread: VBA Not working
View Single Post
 
Old 05-12-2019, 12:36 AM
p45cal's Avatar
p45cal p45cal is offline Windows 10 Office 2016
Expert
 
Join Date: Apr 2014
Posts: 947
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

While in debug mode enter this into the Immediate pane (Ctrl+G if you can't see it):
Code:
?"C:\Documents and Settings\" & strUser & "\Desktop\Forecast\"  & part1 & " " & part2 & " " & part3 & ".xlsx"
and press Enter.
Examine the results and see if there's anything obvious:
Does the file already exisit?
Is the path and filename 100% correct?
Does the folder exist?
Are there any illegal characters in the name?

What is the error message?
Reply With Quote