View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Diddy Diddy is offline
external usenet poster
 
Posts: 155
Default is it possible to record a macro that would lock a sheet

Thank you Bob :-)
--
Deirdre


"Bob Phillips" wrote:

Just loop them all

For Each sh In Activeworkbook.Worksheets

sh.Protect
Next sh

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Diddy" wrote in message
...
Hi Bob,

Following on from that, how would you code it to protect all sheets in the
workbook?

Cheers
--
Deirdre


"Bob Phillips" wrote:

When a macro runs the sheet is already effectively locked. You can
protect
it afterwards with

worksheets("Sheet1").Protect

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)

"des-sa" wrote in message
...
hi again
is there a way to have macro lock a specific sheet for editing when the
macro is run, then maybe have it password protected for editing
afterwards
thanks