View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Metallo[_4_] Metallo[_4_] is offline
external usenet poster
 
Posts: 21
Default HELP to apply a Workbook_Open event

Hi,

I've been given in this forum the following code to get one protected sheet
the possibility to be outlined.
Of course, if I add more sheets in the code it should work as well.

I use XP and Office 2003
I open "my workbook", then, ALT+F11, select into the VBAProject the sheet I
want to apply the event, double click and copy the following:

Private Sub Workbook_Open()
'''Enable Outlining navigation and protect everything on the sheet with
UserInterfaceOnly.
Sheet1.EnableOutlining = True
Sheet1.Protect , True, True, True, True
End Sub

Now, can anybody tell me how to continue in order to apply the event to the
sheet?
I'm sure this is a stupid question but cannot get it to work.

Thank you
Alex