Mel Smith
Well-known Member
- Joined
- Dec 13, 2005
- Messages
- 1,023
- Office Version
- 365
- Platform
- Windows
I'm trying to use VBA to save files to sub-folders. The line of code that I'm using is:
Path = "C:\Users\melsm\Desktop\Averages\CC"
however, the files are saved in the Averages folder and not the sub-folder I want. Is there something wrong with my code?
The next two lines of code are:
filename = Range("B1")
ActiveSheet.SaveAs filename:=Path & filename & " " & Format(Date, "dd-mmm") & ".xlsx", _
FileFormat:=xlOpenXMLWorkbook
Thank you.
Mel
Path = "C:\Users\melsm\Desktop\Averages\CC"
however, the files are saved in the Averages folder and not the sub-folder I want. Is there something wrong with my code?
The next two lines of code are:
filename = Range("B1")
ActiveSheet.SaveAs filename:=Path & filename & " " & Format(Date, "dd-mmm") & ".xlsx", _
FileFormat:=xlOpenXMLWorkbook
Thank you.
Mel