I have a module that saves to a network drive whenever I open the workbook. The problem is the code gives me an error when I try to open the saved file. the code is from a forum post on a different website
Private Sub Workbook_Open()
'Sub SaveToLocations()
ActiveWorkbook.SaveCopyAs "\\svr-files\files\pub_data\HTC Outside Plant\HTC Cable Count\backup" + ActiveWorkbook.Name
ActiveWorkbook.Save
End Sub
It saves it to the backup folder with the name "test.xlsm- That works fine
when I open the backup file I get a debug error. I'm Assuming because it's trying to make a backup in the backup folder with a file I have opened.
is there a way to stop this error?
Private Sub Workbook_Open()
'Sub SaveToLocations()
ActiveWorkbook.SaveCopyAs "\\svr-files\files\pub_data\HTC Outside Plant\HTC Cable Count\backup" + ActiveWorkbook.Name
ActiveWorkbook.Save
End Sub
It saves it to the backup folder with the name "test.xlsm- That works fine
when I open the backup file I get a debug error. I'm Assuming because it's trying to make a backup in the backup folder with a file I have opened.
is there a way to stop this error?