What I have created is a scansheet that simply converts numerical input to scannable barcode - I need to protect these sheets and allow macros to run at the same time.
I have tried both of these statements:
Private Sub Workbook_Open()
Dim wSheet As Worksheet
For Each wSheet In Worksheets
wSheet.Protect Password:="Secret", _
UserInterFaceOnly:=True
Next wSheet
End Sub
------and------
Sub MyMacro()
Sheet1.Unprotect Password:="Secret"
'YOUR CODE
Sheet1.Protect Password:="Secret"
End Sub
Display More
With very little success - to begin the process the user is at the main menu - the "ORIGINAL" BarCode page is hidden. A Macro is written to UnHide this sheet make a copy of it and Rename it to "RENAME ME NOW" --
The original sheet responds correctly to the above however, the copy of, no matter whether is is called BarCode (2) or RENAME ME NOW is TOTALLY Unprotected which is very bad for this group trust me..... I am surprised they can turn their alarm clocks off in the morning and I do not want to spend my entire day rebuilding corrupted worksheets.
Now, I have even added the code to the Orignal Worksheet to look like this:
Private Sub ProtectReNameMe()
Sheets("RENAME ME NOW").Protect Password:="20lb8x19", _
UserInterFaceOnly:=True
End Sub
Which is appled directly to the worksheet. AM I missing a WorkSheet Open statement or some other parameter?
HELP - I goin prematurely bald as it is and I am more familiar with Lotus 123 then Excel (Quite frankly I think Lotus is a piece of cake compared to this)
:confused: