I created a Macros for a spreasheet that works wonderfully up until it saves. It works just fine on my PC but when someone trys to run it on another Networked PC it bug's out at the place in red below:
Dim dtDate As Date
dtDate = Date
Dim strFile As String
strFile ="E:\Elvis\Franchises\Client\Data Documents\Data Team Reports\Client Data Broadcast Data " & Format(dtDate, "mm-dd-yyyy")& ".xlsm"
ActiveWorkbook.SaveAs Filename:=strFile,FileFormat _
:=xlOpenXMLWorkbookMacroEnabled,CreateBackup:=False
I'm getting Run-timer error '1004':
Method 'SaveAs' of object'_Workbook' failed.
So I understand that it's an issue with the other Networked PC's understanding 'Workbook' but I'm not understanding how to fix this. Any suggestions?
Dim dtDate As Date
dtDate = Date
Dim strFile As String
strFile ="E:\Elvis\Franchises\Client\Data Documents\Data Team Reports\Client Data Broadcast Data " & Format(dtDate, "mm-dd-yyyy")& ".xlsm"
ActiveWorkbook.SaveAs Filename:=strFile,FileFormat _
:=xlOpenXMLWorkbookMacroEnabled,CreateBackup:=False
I'm getting Run-timer error '1004':
Method 'SaveAs' of object'_Workbook' failed.
So I understand that it's an issue with the other Networked PC's understanding 'Workbook' but I'm not understanding how to fix this. Any suggestions?