View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default control form macros and protected sheets

Place new code in the macros to unprotect the sheet, run the existing
code then protect the sheet.

Sub ControlFormMacro
Worksheets("LargeWorksheet").Unprotect "password"
'code to do stuff
Worksheets("LargeWorksheet").Protect "password"
End Sub
----------
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"Greyson"
wrote in message
I have a large worksheet that requires data entry by other users. There are
both locked and unlocked cells within the worksheet. The database contains
several control form macros that cannot run if the sheet is protected.
Portions of the worksheet require sheet protection to prevent changes. Is
there a way to protect the worksheet and still run the macros?