View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Vibeke Vibeke is offline
external usenet poster
 
Posts: 30
Default How to execute a macro in a protected worksheet?

I was delighted to find your exchange with Hanoi, as he had exactly the same
problem as I do and it seems you solved it perfectly. Unfortunately...and I
hope you don't mind me asking this...I don't completely understand how to use
your instructions. Is it included in the macro, and what impact will this
have on the end user?

(BTW, my workbook is two spreadsheets - one for data entry (in Columns b to
F)against particular dates (in Column A) . Sheet Two is formatted to look
like a standard calendar, the rows under each day containing formulas to
VLOOKUP the data in Spreadsheet One. My macro autofits the row heights, as
cells in Columns B-F can be either blank or full of text.)

If you could indulge my ingnorance, I would be very appreciative.
Regards,
Vibeke

"Paul B" wrote:

Hanoi, one way,

Const PW As String = "123" 'Change Password Here
ActiveSheet.Unprotect Password:=PW
'you code here
ActiveSheet.Protect Password:=PW


--
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

"Ha Noi" <Ha wrote in message
...
I create a new macro in my spreadsheet, and now I can't protect it because
the macro won't work. please let me know.
thks
Hanoi