View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JAD JAD is offline
external usenet poster
 
Posts: 43
Default Unprotect, Run Action then Protect

I have a worksheet that an end user can add a set number of rows each time
they left click on a specific graphic. To make sure of the integrity of the
worksheet, it is protected at all times other than when rows are added. The
basic sequence to adding rows is:

1) Unprotect the worksheet (password protected)
2) Add the additional rows to the existing template.
3) Protect the worksheet (password protected)

Using a combination of the macro recorder and VB, I am missing the line of
programming that I can write in the password to unprotect and at the end
write in the password to protect and return the spreadsheet to normal
protected status. How can I enter the password into VB to accomplish my goal?
Any help would be appreciated, Thank You, JAD