-
Run-Time error when saving
I am trying to do a save into a dynamic folder path (...\YYYY\03 March\), but continue to get an error message "Method 'Save As' of object '_Workbook' failed
below is my code, i've also included a msg box, to verify my path in the macro, but continue to have issues.
MsgBox "W:\Finance\Billings" & ActiveSheet.Range("B1") & "" & ActiveSheet.Range("C1") & ActiveSheet.Range("A1") & ""
Dim Path As String
Dim filename As String
Path = "W:\Finance\Billings" & ActiveSheet.Range("B1") & "" & ActiveSheet.Range("C1") & ActiveSheet.Range("A1") & ""
filename = Range("D1")
ActiveWorkbook.SaveAs filename:=Path & filename & ".xlsx", FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
Cell B1 is the year, C1 is the month (03), D1 is the File name for the file
Any suggestions?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules