How do I protect a worksheet but allow a control button to work?
Thank you!
How do I protect a worksheet but allow a control button to work?
Thank you!
You may want to allow the code to unlock the worksheet...
Function ThePassword()
ThePassword = "Excel_1"
End Function
Sub Add_Member()
Dim mName As String
ActiveWorkbook.Unprotect (ThePassword())
Worksheets("Template").Unprotect (ThePassword())
''' Ask for new name
mName = InputBox("Enter new member's name.")
Sheets("Template").Copy After:=Sheets(Sheets.Count)
<do other stuff>
Worksheets("Menu").Select
Worksheets("Template").Protect (ThePassword())
ActiveWorkbook.Protect
Exit Sub
"pywhacket" wrote:
> How do I protect a worksheet but allow a control button to work?
>
> Thank you!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks