Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default protect sheets allow buttons

How do I protect a worksheet but allow a control button to work?

Thank you!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default protect sheets allow buttons

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!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Protect sheets in one go mohavv Excel Discussion (Misc queries) 4 March 11th 08 10:21 PM
Protect some sheets in an xls but not all. lucky1 Excel Worksheet Functions 0 June 6th 07 09:05 PM
how to protect excel worksheet and still use the outline buttons? sylvia Excel Worksheet Functions 0 December 6th 05 12:32 PM
how to protect sheets from VBA? jon Excel Programming 1 September 16th 04 06:11 PM
Protect sorting buttons in menubar Tom Excel Programming 2 January 22nd 04 07:57 PM


All times are GMT +1. The time now is 01:46 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"