View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Sheet Protection

Mike,

Use the UserInterfaceOnly parameter when you protect the sheet.
This allows VBA code to do anything to the sheet; it only
protects against use action with the keyboard and mouse. E.g.,

Worksheets(1).Protect UserInterfaceOnly:=True


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Mike" wrote in message
...
Hi. I have a macro that is activated on any Worksheet
Change. I would like to protect this sheet so that the
user will only enter data in the appropriate cells. When
I protect the sheet, however, I get an application
error. The application error occurs when the macro
attempts to delete a shape ...

Any ideas?

Thanks,
Mike.