Sub SaveWOWithNewName()
Dim strNew As String
Dim F6 As Range
strNew = "C:\Users\AdminAssist\Dropbox\Work Orders\Work Order Index\@1.xlsm"
Application.ScreenUpdating = False
With ActiveSheet
Set F6 = .Range("F6")
.Copy
End With
ActiveWorkbook.SaveAs Replace(strNew, "@1", F6.Value), FileFormat:=xlOpenXMLWorkbookMacroEnabled
With ActiveSheet
F6.Value = F6.Value + 1
.Range("A9:G19,B4:B7,E20,E48,F7").ClearContents
End With
Application.ScreenUpdating = True
Set F6 = Nothing
End Sub
I get the error message "Run-time Error 1004: Method 'SaveAs' of object '_Workbook' failed. Debugger takes me to bold line above. Please Help...So Close!
Dim strNew As String
Dim F6 As Range
strNew = "C:\Users\AdminAssist\Dropbox\Work Orders\Work Order Index\@1.xlsm"
Application.ScreenUpdating = False
With ActiveSheet
Set F6 = .Range("F6")
.Copy
End With
ActiveWorkbook.SaveAs Replace(strNew, "@1", F6.Value), FileFormat:=xlOpenXMLWorkbookMacroEnabled
With ActiveSheet
F6.Value = F6.Value + 1
.Range("A9:G19,B4:B7,E20,E48,F7").ClearContents
End With
Application.ScreenUpdating = True
Set F6 = Nothing
End Sub
I get the error message "Run-time Error 1004: Method 'SaveAs' of object '_Workbook' failed. Debugger takes me to bold line above. Please Help...So Close!