allow macros in protected worksheet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a worksheet with contains macros. I want to protect the worksheet,
but allow the macros to run. When I protect the worksheet, the macros are no
longer enabled. How do I correct this?
 
Marge, use user inter face to protect the sheet, then your macros will be
able to run, something like this

Private Sub Workbook_Open()

Worksheets("sheet1").Protect password:="test", userInterfaceOnly:=True

End Sub



This is not retained with the workbook when saved so it must be reset when
the workbook is re-opened, thats is why it is put in the workbook open event
of the this workbook code
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top