View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default PROTECT MULTIPLE SHEETS IN EXCEL WORKBOOK SIMULTANEOUSLY?

You could use a macro like this:

Option Explicit
Sub testme()
Dim dCtr As Long
Dim wks As Worksheet

dCtr = DateSerial(2008, 10, 2)

For Each wks In ActiveWorkbook.Worksheets
wks.Name = Format(dCtr, "yyyy-mm-dd")
dCtr = dCtr + 1
wks.Protect Password:="TopSecret"
Next wks
End Sub


If you're new to macros:

Debra Dalgleish has some notes how to implement macros he
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)

SEAKAPTAIN wrote:

LOOKING FOR WAY T0 PRTECT SEVERAL OR ALL SHEETS IN EXCEL WORKBOOK AT ONCE
WITHOUT HAVING TO DO EACH INDIVIDUALLY. ALSO, CONSECUTIVELY DATE SHEETS IN
WORKBOOK WITHOUT HAVING TO DO INDIVIDUALLY ???


--

Dave Peterson