View Single Post
  #4   Report Post  
Sue
 
Posts: n/a
Default event macros - xl 2003

Hi dominicb,
Thank you for your response. I have the event macro running well now plus
based on your advice I don't have to enter the password now while the macro
runs to unprotect the worksheet but... when the macro reprotects the
worksheet after the sort it is not passwording it. The worksheet is
protected but anybody could unprotect it again without the password. How do
I get it to reset the password?
Thanks heaps
Sue

"dominicb" wrote:


Good morning Sue

Problem 1:
Use of the password property as shown below will solve that problem.
ActiveSheet.Unprotect Password:="pass"

Problem 2:
Renaming your macro auto_open will cause it to run automatically on the
file being opened.

If you prefer you can set it up as an event procedure - in this case
rename your macro Private Sub Workbook_Open() and move it from the
modules part of the VBE to ThisWorkbook.

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=482553