View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Protected Worksheets

Look in excel help at the protect and unprotect method.

If using xl2000 or earlier, you can set the userinterfaceonly property to
true and your macro can manipulate the worksheet. In xl2002 and later, you
have to supply the password to set this. You would include the password in
your code. Then protect the project in the VBE so the user can not see the
code.

--
Regards,
Tom Ogilvy

"Shamsul Islam" wrote in message
...
Hi

I have a workbook I want to send to other users. This
workbook has protected worksheets. The worksheets have to
be password protected.

How do I create a macro which will unprotect and after
completed the task protect the worksheet without asking
the user for the password I have set.

Regards

Sham