View Single Post
  #2   Report Post  
Don Guillett
 
Posts: n/a
Default

try doing it sheet by sheet to delete but with a onerror resume next to
bypass the protected.

--
Don Guillett
SalesAid Software

"BD7447" wrote in message
...
Hi,

I have a workbook with half a dozen protected pages. Within each page is

a
range of unprotected cells.

What I'm trying to do is write a macro which will delete the contents of

all
unprotected cells in the workbook. I've attempted writing this by

selecting
each of the unprotected cells in each page, then deleting.

However, when I then assign the macro and run this, I get a runtime error
because I am attempting to delete content from a protected sheet.

Is there a simple way of doing what I want? Indeed, is there any way to

do
what I want, without unprotecting the workbook? Or, should I incorporate
unprotecting and then reprotecting each sheet into the macro? I'd rather

avoid
this if I can?

Many thanks