Hi
I am not sure if this is correct. Before I have combine this code, the code was working.
This is the original which working after I mixed everything together.
Before:
Sub ctrlz()
SendKeys "^z"
End Sub
After: Not working.
Sub ctrlz()
Sheets("Sheet1").Unprotect "Password"
SendKeys "^z"
With Sheets("Sheet1")
.Protect _
Password:="Password", _
DrawingObjects:=True, _
Contents:=True, _
Scenarios:=True, _
AllowFormattingCells:=True, _
AllowSorting:=True
.EnableSelection = xlUnlockedCells
End With
End Sub
Thank you
Bookmarks