julianchan58
New Member
- Joined
- Sep 11, 2019
- Messages
- 2
Hi all,
My VBA used to run with no issue, but recently seeing "System Error &H80070057 (-2147024809)"
VBA simply protect all worksheets in the workbook. Am currently using Office 365 (running under Win10) . Any clue what could have caused the issue? many thanks!!!!!
__________________________________________
Sub protectsheet()
Dim ws As Worksheet
Dim pw As Variant
pwd = "finBkk20" ' Put your password here
For Each ws In Worksheets
ws.protect Password:=pwd
Next ws
Worksheets("Instruction").Activate
MsgBox ("All sheets protected")
End Sub
My VBA used to run with no issue, but recently seeing "System Error &H80070057 (-2147024809)"
VBA simply protect all worksheets in the workbook. Am currently using Office 365 (running under Win10) . Any clue what could have caused the issue? many thanks!!!!!
__________________________________________
Sub protectsheet()
Dim ws As Worksheet
Dim pw As Variant
pwd = "finBkk20" ' Put your password here
For Each ws In Worksheets
ws.protect Password:=pwd
Next ws
Worksheets("Instruction").Activate
MsgBox ("All sheets protected")
End Sub