hellfire45
Active Member
- Joined
- Jun 7, 2014
- Messages
- 464
So the code below is supposed to create a folder (Which is does) and then save these 4 files to the folder. The problem is that it won't save them. The code does not error, but it won't save them. What am I missing here?
Thanks guys. I know one of you smarties can help me.
Thanks guys. I know one of you smarties can help me.
Code:
If Dir("I:\ASM\All\CRT\Reporting\In Consolidation Process\Master Automation\Saved CRT Uploads\" & Format(Date, "yyyy-mm-dd"), vbDirectory) = "" Then
MkDir ("I:\ASM\All\CRT\Reporting\In Consolidation Process\Master Automation\Saved CRT Uploads\" & Format(Date, "yyyy-mm-dd") & "\")
End If
destinationpath = "I:\ASM\All\CRT\Reporting\In Consolidation Process\Master Automation\Saved CRT Uploads\" & Format(Date, "yyyy-mm-dd") & "\"
tracking_saveas = destinationpath & "CRT UPLOAD Tracking" & Format(Date, "mm/dd/yyyy") & ".xlsx"
serials_saveas = destinationpath & "CRT UPLOAD Serials" & Format(Date, "mm/dd/yyyy") & ".xlsx"
backlog_saveas = destinationpath & "CRT UPLOAD Backlog" & Format(Date, "mm/dd/yyyy") & ".xlsx"
shipments_saveas = destinationpath & "CRT UPLOAD ETAs from Shipments" & Format(Date, "mm/dd/yyyy") & ".xlsx"
Workbooks(CRT_Tracking).SaveAs filename:=tracking_saveas, FileFormat:=xlWorkbookNormal
Workbooks(CRT_Serials).SaveAs filename:=serials_saveas, FileFormat:=xlWorkbookNormal
Workbooks(CRT_Backlog).SaveAs filename:=backlog_saveas, FileFormat:=xlWorkbookNormal
Workbooks(CRT_Shipments).SaveAs filename:=shipments_saveas, FileFormat:=xlWorkbookNormal
Workbooks(CRT_Tracking).Close True
Workbooks(CRT_Serials).Close True
Workbooks(CRT_Backlog).Close True
Workbooks(CRT_Shipments).Close True