Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 331
Default protect multiple sheets at one time with options

i have 50+ pages to protect. i have the code to protect and unprotect all the
pages at once.
my question is:
How can i add code so the user to change font, color, etc.. in these
protected sheets?


any and all help would greatly be appreciated
Many thanks in advance.

Greg
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 791
Default protect multiple sheets at one time with options

If you are using Excel 2003 use the following statement:

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True

This is not allowed in lower Excel Versions.
--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Greg" wrote:

i have 50+ pages to protect. i have the code to protect and unprotect all the
pages at once.
my question is:
How can i add code so the user to change font, color, etc.. in these
protected sheets?


any and all help would greatly be appreciated
Many thanks in advance.

Greg

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 331
Default protect multiple sheets at one time with options

Thanks for the fast response!
i'm using Office 07 but users are 03
when i inserted your code i was not able to change any formatting. i may
have put it in the wrong place.

here is the code i'm using now:

Sub protect_sheets()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Protect Password:=""
Next ws

"Michael" wrote:

If you are using Excel 2003 use the following statement:

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True

This is not allowed in lower Excel Versions.
--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Greg" wrote:

i have 50+ pages to protect. i have the code to protect and unprotect all the
pages at once.
my question is:
How can i add code so the user to change font, color, etc.. in these
protected sheets?


any and all help would greatly be appreciated
Many thanks in advance.

Greg

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 791
Default protect multiple sheets at one time with options

Try this:
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets

ws.Protect Password:=""
ws.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True
Next ws
--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Greg" wrote:

Thanks for the fast response!
i'm using Office 07 but users are 03
when i inserted your code i was not able to change any formatting. i may
have put it in the wrong place.

here is the code i'm using now:

Sub protect_sheets()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Protect Password:=""
Next ws

"Michael" wrote:

If you are using Excel 2003 use the following statement:

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True

This is not allowed in lower Excel Versions.
--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Greg" wrote:

i have 50+ pages to protect. i have the code to protect and unprotect all the
pages at once.
my question is:
How can i add code so the user to change font, color, etc.. in these
protected sheets?


any and all help would greatly be appreciated
Many thanks in advance.

Greg

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 331
Default protect multiple sheets at one time with options

THANK YOU! that worked great on the unlocked cells can i apply this to locked
cells as well? i have some cells locked so they can not alter the formulas

Once again Michael i appreciate all your time.

"Michael" wrote:

Try this:
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets

ws.Protect Password:=""
ws.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True
Next ws
--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Greg" wrote:

Thanks for the fast response!
i'm using Office 07 but users are 03
when i inserted your code i was not able to change any formatting. i may
have put it in the wrong place.

here is the code i'm using now:

Sub protect_sheets()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Protect Password:=""
Next ws

"Michael" wrote:

If you are using Excel 2003 use the following statement:

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True

This is not allowed in lower Excel Versions.
--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Greg" wrote:

i have 50+ pages to protect. i have the code to protect and unprotect all the
pages at once.
my question is:
How can i add code so the user to change font, color, etc.. in these
protected sheets?


any and all help would greatly be appreciated
Many thanks in advance.

Greg



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 791
Default protect multiple sheets at one time with options

I tested the code in my Excel 2003 and it works with both locked and unlocked
cells, If you cannot confirm, try getting one of the Excel 2003 users to test
it for you.
--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Greg" wrote:

THANK YOU! that worked great on the unlocked cells can i apply this to locked
cells as well? i have some cells locked so they can not alter the formulas

Once again Michael i appreciate all your time.

"Michael" wrote:

Try this:
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets

ws.Protect Password:=""
ws.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True
Next ws
--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Greg" wrote:

Thanks for the fast response!
i'm using Office 07 but users are 03
when i inserted your code i was not able to change any formatting. i may
have put it in the wrong place.

here is the code i'm using now:

Sub protect_sheets()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Protect Password:=""
Next ws

"Michael" wrote:

If you are using Excel 2003 use the following statement:

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True

This is not allowed in lower Excel Versions.
--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Greg" wrote:

i have 50+ pages to protect. i have the code to protect and unprotect all the
pages at once.
my question is:
How can i add code so the user to change font, color, etc.. in these
protected sheets?


any and all help would greatly be appreciated
Many thanks in advance.

Greg

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Protect/Unprotect Multiple Sheets With Full Options TEK Excel Discussion (Misc queries) 4 February 11th 09 02:56 PM
Are there ways to protect multiple sheets at once? Monty New Users to Excel 3 May 29th 08 11:57 PM
Macro to protect multiple sheets? Stilla Excel Worksheet Functions 12 March 5th 07 07:03 PM
How do I protect multiple sheets at one time? Kelly Excel Worksheet Functions 1 February 27th 06 04:30 PM
Protect multiple sheets in one time Henk Frigge Excel Programming 4 June 29th 05 01:16 PM


All times are GMT +1. The time now is 09:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"