I have a sheet with password. But I need to add some data from vba code. How can I do this? Maybe I can reset password, then add data and then set it again
Me.Parent.Worksheets("Sheet1").Unprotect 111
Me.Parent.Worksheets("Sheet1").Protect Password:=111, DrawingObjects:=True, Contents:=True, Scenarios:=True
When I use simple password, code works, but if I set pass: pass111111 – there is an error Wrong password
It’s easy: