View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
STEVE BELL STEVE BELL is offline
external usenet poster
 
Posts: 692
Default Can I use a Macro to unprotect a sheet in the workbook?

Bob,

This is relatively easy.

Just record the protect and unprotect steps and edit the resulting code.

You can either put these codes into separte macros and call them from
sheet1,
or incorpate them into the sheet1 code.

--
steveB

Remove "AYN" from email to respond
wrote in message
oups.com...
I would like to have my macro, which is driven from sheet 1 of a
workbook, unprotect sheet 2 of the same workbook, then make changes to
sheet 2 (which consist of simply hiding some rows depending on
variables entered on sheet 1), and then reprotect sheet 2. I do not
plan to password protect sheet 2, but I do not want someone to
accidentally change a cell on sheet 2 before or after the macro has
done its thing. Thanks to help from people on this group, the macro
works on the sheet if it is unprotected. Now I am on the next stage.

Thanks in advance for the help for this old timer, ex-fortran
programmer - yep, that old...

Bob Q.