sharky12345
Well-known Member
- Joined
- Aug 5, 2010
- Messages
- 3,422
- Office Version
- 2016
- Platform
- Windows
Can anyone offer any advice as to why the following code randomly generates a run time error 1004, 'Method 'SaveAs' of object '_Workbook' failed'?
I've read various bits on the internet, none of which seem to apply here, (for example the workbook is not on a shared or mapped drive).
If there is no obvious solution, is there a way I can ignore this particular error? (I know that I could ignore all errors but I just want to ignore this particular one if that is the only option).
I've read various bits on the internet, none of which seem to apply here, (for example the workbook is not on a shared or mapped drive).
If there is no obvious solution, is there a way I can ignore this particular error? (I know that I could ignore all errors but I just want to ignore this particular one if that is the only option).
Code:
DestFile.SaveAs fileName:=ThisWorkbook.path & "\ST Files\System Files\" & "Raw Data (For Import) - " & Sheet8.Range("B1").Value & " " & Sheet8.Range("B5").Value & " (" & Sheet8.Range("F3").Value & ")" & ".xlsx"
Last edited: