LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Joseph Geretz
 
Posts: n/a
Default Seeking help for total worksheet protection

The code below cycles through every worksheet and protects it. It then sets
the active worksheet back to the first worksheet.

For Each WkSht In m_DocExcel.Worksheets
WkSht.Protect "mypassword", True, True, True, True
WkSht.Activate
m_AppExcel.ActiveWindow.DisplayGridlines = False
m_AppExcel.ActiveWindow.DisplayHeadings = False
Next WkSht
m_DocExcel.Worksheets(1).Activate

Is it possible to set protection on the entire workbook in one atomic
operation, or do I need to set the protection for each sheet separately, as
I am doing? And is there a more efficient way of setting the appearance
style for every worksheet or must I cycle through them individually as I am
doing? (I guess I could implement events and only set these properties if
the user actually activates a particular sheet?)

Anyway, here's my main question: With this approach I am able to lock the
contents of all cells, but this does not lock embedded VBA widgets, e.g.
Checkboxes, Command Buttons, etc. How can I lock these objects as well?

Thanks for your help!

- Joe Geretz -


 
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
Bring all text from "Text" worksheet Dradin Excel Discussion (Misc queries) 1 December 27th 04 08:37 PM
How do link to a remote worksheet using the path value in a field? Michael T. Links and Linking in Excel 3 December 11th 04 08:45 AM
How do I copy page setup from one worksheet & paste into new shee. Rasc0 Excel Discussion (Misc queries) 2 December 1st 04 10:12 PM
Linking items GREATER THAN O on another worksheet in the same Work Eddie Shapiro Excel Discussion (Misc queries) 4 December 1st 04 02:55 PM
Worksheet name and Backward compatibility Rich Excel Discussion (Misc queries) 3 November 30th 04 06:10 PM


All times are GMT +1. The time now is 12:11 PM.

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"