Hello XLS friends! 
Pls bear with me as I haven't done macros since L123/DOS. My macro works fine except when the sheet that is named and saved is reopened for future editing the locked cells can be selected. They are still locked and cannot be edited. I verify that the sheet is still protected. I unprotect it and upon re-protecting it find the SELECT LOCKED CELLS is enabled or set to TRUE.
Any help to get me beyond this hump will be greatly appreciated.
Best regards, GregM
Pls bear with me as I haven't done macros since L123/DOS. My macro works fine except when the sheet that is named and saved is reopened for future editing the locked cells can be selected. They are still locked and cannot be edited. I verify that the sheet is still protected. I unprotect it and upon re-protecting it find the SELECT LOCKED CELLS is enabled or set to TRUE.
Any help to get me beyond this hump will be greatly appreciated.
Best regards, GregM
Code:
Sub saving()
Dim tempName As String
tempName = ActiveWorkbook.Name
If tempName <> "InvTemplate.xls" Then
Exit Sub
End If
' Sheets("Simple Invoice").Protect userinterfaceonly:=True
ActiveSheet.Unprotect
[M12].Value = [M12].Value + 1
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
ActiveSheet.EnableSelection = xlUnlockedCells
ActiveSheet.Protect
Application.DisplayAlerts = False
ThisWorkbook.SaveAs ("C:\Documents and Settings\Marisa\Desktop\Invoices\InvTemplate.xls")
Application.DisplayAlerts = True
Dim invName As String
Range("C9").Select
invName = InputBox("What is the Invoice Name?")
Range("C9").Value = invName
invName = invName + "_" + CStr([M12].Value)
ThisWorkbook.SaveAs ("C:\Documents and Settings\Marisa\Desktop\Invoices\" & invName & ".xls")
End Sub