I have the following save macro that unlocks a cell, saves the file with a new name and then locks the cell again to protect a formula. The issue I'm having is when it locks the sheet again, it does not allow my pictures in the report to be modified. Is there something I can add to the code, that will check the "edit object" & "edit scenarios" during the cell lock function?
Sub SaveFile()
'
' SAVEFILE Macro
'Dim sNameSheet As String
sNameSheet = Range("NAME").Value
ActiveSheet.Unprotect "password"
Sheets("report").Range("Date").Value = Now()
ActiveSheet.Protect "password"
ActiveWorkbook.SaveAs Filename:="C:\documents" & sNameSheet
'
End Sub
I appreciate the help and feedback.
Thanks,
Brian
Sub SaveFile()
'
' SAVEFILE Macro
'Dim sNameSheet As String
sNameSheet = Range("NAME").Value
ActiveSheet.Unprotect "password"
Sheets("report").Range("Date").Value = Now()
ActiveSheet.Protect "password"
ActiveWorkbook.SaveAs Filename:="C:\documents" & sNameSheet
'
End Sub
I appreciate the help and feedback.
Thanks,
Brian