Here is my code
Sub SaveWOWithNewName()
Dim strNew As String
Dim F5 As Range
strNew = "C:\Users\AdminAssist\Dropbox\Work Orders\Work Order Index\@1.xlsm"
Application.ScreenUpdating = False
With ActiveSheet
Set F5 = .Range("F5")
.Copy
End With
ActiveWorkbook.SaveAs Replace(strNew, "@1", F5.Value), FileFormat:=xlOpenXMLWorkbookMacroEnabled
With ActiveSheet
F5.Value = F5.Value + 1
.Range("A9:G19,B4:B7,E20,E48,F7").ClearContents
End With
Application.ScreenUpdating = True
Set F5 = Nothing
End Sub
with my red line popping up as the debug line. Got the code as a modified version of my original from another posted thread that died. Dont know what is going on. getting run-time errors telling me the file doesnt exist and is listing a filepath that is in the folder I like, but not it. something like: "C:\\Users\AdminAssist\Dropbox\Work Orders\Work Order Index\6\253492\"
Frustrating. Not a seasoned coder.
Plz help.
Sub SaveWOWithNewName()
Dim strNew As String
Dim F5 As Range
strNew = "C:\Users\AdminAssist\Dropbox\Work Orders\Work Order Index\@1.xlsm"
Application.ScreenUpdating = False
With ActiveSheet
Set F5 = .Range("F5")
.Copy
End With
ActiveWorkbook.SaveAs Replace(strNew, "@1", F5.Value), FileFormat:=xlOpenXMLWorkbookMacroEnabled
With ActiveSheet
F5.Value = F5.Value + 1
.Range("A9:G19,B4:B7,E20,E48,F7").ClearContents
End With
Application.ScreenUpdating = True
Set F5 = Nothing
End Sub
with my red line popping up as the debug line. Got the code as a modified version of my original from another posted thread that died. Dont know what is going on. getting run-time errors telling me the file doesnt exist and is listing a filepath that is in the folder I like, but not it. something like: "C:\\Users\AdminAssist\Dropbox\Work Orders\Work Order Index\6\253492\"
Frustrating. Not a seasoned coder.
Plz help.