I find one more routine from this module...
Sub SetProtection_AllSheets(Optional Wkb As Workbook, _
Optional bApply As Boolean = True)
Dim Wks As Worksheet
If Wkb Is Nothing Then Set Wkb = ActiveWorkbook
Application.ScreenUpdating = False
For Each Wks In Wkb.Worksheets
If bApply Then ResetProtection Wks Else wksUnprotect Wks
Next 'Wks
Application.ScreenUpdating = True
End Sub
Note that I did not def the constant 'PWRD' in this modules
declarations because it normally exists in my m_OpenClose module as a
global, and so gets initiated by default when the project workbook
opens. (I use Auto_Open/Auto_Close routines)
--
Garry
Free usenet access at
http://www.eternal-september.org
Classic
VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.
vb.general.discussion