Petunia, Yes, the sheet will be protected in the same way as if you
protected it yourself, the user will not know that the sheet is being
unprotected and then protected when the macro is run so the sheet will be
locked any time the macro is not running, if you use the user interface only
this will let the macros run on a protected sheet.
You may want to reference a sheet like this instead of the active sheet like
this
Worksheets("sheet1").Protect UserInterfaceOnly:=True, password:="123"
Be aware that sheet protection is very weak in excel, but it will keep
someone form accidentally messing up your data.
You may want to protect the VBA project so others will not see the password
in it, from your workbook right-click the workbook's icon and pick View
Code. This icon is to the left of the "File" menu this will open the VBA
editor, in the left hand window right click on your workbook name and select
VBA project properties, protection, check lock project for viewing and set a
password. Press Alt and Q to close this window and go back to your workbook
and save and close the file.
--
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