Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Macro to Protect the Whole Workbook and Allow Range Edits

Hi, there!

I was wondering if it's possible to create a macro that would password
protect the whole workbook at once without having to protect each individual
sheet, and at the same time allow users to edit a specific range.

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Macro to Protect the Whole Workbook and Allow Range Edits

Hi,

Do you mean this?

Sub sonic()
For x = 1 To Worksheets.Count
Sheets(x).Range("A1:H10").Locked = False
Sheets(x).Protect Password:="MyPass"
Next
End Sub

Unlock as many/few cells in each sheet as you require.

Mike

"EugeniaP" wrote:

Hi, there!

I was wondering if it's possible to create a macro that would password
protect the whole workbook at once without having to protect each individual
sheet, and at the same time allow users to edit a specific range.

Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Macro to Protect the Whole Workbook and Allow Range Edits

Mike,

It's giving me a run-time error '1004' Unable to set the Locked property of
the Range class.

EugeniaP

"Mike H" wrote:

Hi,

Do you mean this?

Sub sonic()
For x = 1 To Worksheets.Count
Sheets(x).Range("A1:H10").Locked = False
Sheets(x).Protect Password:="MyPass"
Next
End Sub

Unlock as many/few cells in each sheet as you require.

Mike

"EugeniaP" wrote:

Hi, there!

I was wondering if it's possible to create a macro that would password
protect the whole workbook at once without having to protect each individual
sheet, and at the same time allow users to edit a specific range.

Thanks!

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
Use Macro to protect choosen sheets in workbook kevhatch Excel Discussion (Misc queries) 1 January 27th 07 06:52 PM
Sharing Workbook - allowing multiple edits celticmcse Excel Discussion (Misc queries) 1 January 22nd 07 05:27 PM
Can I allow Additions but not Edits? Keith Excel Discussion (Misc queries) 2 November 9th 06 01:10 PM
Protect Workbook Vs Protect Sheet Poor_pakistani New Users to Excel 4 May 25th 06 02:06 PM
Limiting edits alexandra60 Excel Discussion (Misc queries) 3 February 8th 06 09:55 AM


All times are GMT +1. The time now is 10:10 PM.

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

About Us

"It's about Microsoft Excel"