LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default Protect Chart Sheet

I have a macro that protects all the worksheets in a workbook, but not the
chart sheets. I need for it to protect them as well. Can anyone help? Here is
the code I use to protect the worksheets and workbook:

Application.ScreenUpdating = False

Dim password As String

password = Application.InputBox(prompt:="What Password Do You Want To Use?",
Type:=2)
If password = "" Then
'do nothing
Else
For Each ws In Worksheets
ws.Activate
ActiveSheet.Protect (password)
Next ws
End If

Application.ThisWorkbook.Protect (password), structu=True
Worksheets("Global & Monthly Inputs").Activate
Range("A1").Select
Application.ScreenUpdating = True

Thanks!
 
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 sheet enyaw Excel Programming 2 August 17th 06 10:33 AM
Protect Workbook Vs Protect Sheet Poor_pakistani New Users to Excel 4 May 25th 06 02:06 PM
Can I protect columns w/in a "List" using Protect Sheet? Diane Excel Discussion (Misc queries) 0 May 10th 06 03:30 PM
Lock and protect cells without protect the sheet Christian[_7_] Excel Programming 6 December 28th 04 04:50 PM
excel - macro code to open a protected sheet, enter passowrd, and then protect sheet arunjoshi[_5_] Excel Programming 1 May 2nd 04 03:50 PM


All times are GMT +1. The time now is 03:18 AM.

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

About Us

"It's about Microsoft Excel"