View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] jamie.cutting@mouchelparkman.com is offline
external usenet poster
 
Posts: 17
Default Protect sheets when activated from ShowSheetsList application

I am using the following macro to allow users to select sheets:

Sub ShowSheetList()
On Error Resume Next
If ActiveWorkbook.Sheets.Count = 1 Then
Application.CommandBars("Workbook Tabs"). _
ShowPopup 500, 200
Else
Application.CommandBars("Workbook Tabs"). _
Controls("More Sheets...").Execute
End If
On Error GoTo 0
End Sub

All sheets are protected but I wish users to be able to edit a certain
sheet called database if they have the correct password . Would anyone
know how to implement this within the above or do i need to do
something more global so independantly of how the sheet is selected
(i.e. irrespective of the above code) the password prompt is
activated.

Many thanks foe any advice.

Regards
JAmie