Hello,
I'm working with a .xlsb template file that pulled data from SAP, then runs a Macro to format the data. The template macro needs to run multiple times, so I need help saving the workbook without actually saving the template. I'm trying to use the SaveCopyAs command now, but I'm getting an error with my FileFormat. Any help would be appreciated. Here's my code so far.
Sub Save()
Dim FileName As String
Dim Path As String
Dim DateValue As String
Dim WbsValue As String
Sheet6.Select
DateValue = Range("B3")
WbsValue = Range("A1")
WbsValue = Replace(WbsValue, ".", "")
WbsValue = Replace(WbsValue, "-", "")
FileName = DateValue & "_" & WbsValue
Path = "C:\Users\xqs2269\Desktop\Bi-Monthly Commerical\"
ActiveWorkbook.SaveCopyAs FileName:= _
Path & FileName _
, FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
End Sub
Bookmarks