Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Bring all text from "Text" worksheet | Excel Discussion (Misc queries) | |||
How do link to a remote worksheet using the path value in a field? | Links and Linking in Excel | |||
How do I copy page setup from one worksheet & paste into new shee. | Excel Discussion (Misc queries) | |||
Linking items GREATER THAN O on another worksheet in the same Work | Excel Discussion (Misc queries) | |||
Worksheet name and Backward compatibility | Excel Discussion (Misc queries) |