Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Protect sheets from editing but allowing macro to do so?

Is it possible to protect all the sheets from a workbook from editio
allowing the macros to edit the cells and so on?

Best Regards

Noo

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Protect sheets from editing but allowing macro to do so?

Hi Nook,

Try:

Dim sh As Worksheet
For Each sh In ActiveWorkbook.Sheets
ActiveSheet.Protect password:="PW", _
UserInterfaceOnly:=True
Next


Replace PW with your designated password


---
Regards,
Norman



"NooK " wrote in message
...
Is it possible to protect all the sheets from a workbook from edition
allowing the macros to edit the cells and so on?

Best Regards

NooK


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Protect sheets from editing but allowing macro to do so?

Hi Nook,

Typo warning!

The code should read:

Replace activesheet with sh


---
Regards,
Norman



"Norman Jones" wrote in message
...
Hi Nook,

Try:

Dim sh As Worksheet
For Each sh In ActiveWorkbook.Sheets
ActiveSheet.Protect password:="PW", _
UserInterfaceOnly:=True
Next


Replace PW with your designated password


---
Regards,
Norman



"NooK " wrote in message
...
Is it possible to protect all the sheets from a workbook from edition
allowing the macros to edit the cells and so on?

Best Regards

NooK


---
Message posted from http://www.ExcelForum.com/





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Protect sheets from editing but allowing macro to do so?

To remove unintentional confusion:

For Each sh In ActiveWorkbook.Sheets
sh.Protect password:="PW", _
UserInterfaceOnly:=True
Next sh

---
Regards,
Norman

--

---
Regards,
Norman



"Norman Jones" wrote in message
...
Hi Nook,

Typo warning!

The code should read:

Replace activesheet with sh


---
Regards,
Norman



"Norman Jones" wrote in message
...
Hi Nook,

Try:

Dim sh As Worksheet
For Each sh In ActiveWorkbook.Sheets
ActiveSheet.Protect password:="PW", _
UserInterfaceOnly:=True
Next


Replace PW with your designated password


---
Regards,
Norman



"NooK " wrote in message
...
Is it possible to protect all the sheets from a workbook from edition
allowing the macros to edit the cells and so on?

Best Regards

NooK


---
Message posted from http://www.ExcelForum.com/







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default Protect sheets from editing but allowing macro to do so?

To protect al sheets in the Workbook

For each Sh in Worksheets.Count
Sh.Protect UserInterFaceOnly:=True
Next

Regards, Don

"NooK " wrote in message
...
Is it possible to protect all the sheets from a workbook from edition
allowing the macros to edit the cells and so on?

Best Regards

NooK


---
Message posted from http://www.ExcelForum.com/





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Protect sheets from editing but allowing macro to do so?

Thanks a lot. Mostly appreciated.
Worked like a charm.

Best Regards

Noo

--
Message posted from http://www.ExcelForum.com

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
URGENT: Double Clicking Not Allowing Editing In Cell FARAZ QURESHI Excel Discussion (Misc queries) 2 March 12th 09 12:58 PM
Allowing editing locked cells in a protected sheet in excel phoenix[_2_] Excel Worksheet Functions 1 December 23rd 08 11:50 AM
How do I protect a number of sheets allowing the user to add a com Prashanth KR New Users to Excel 8 August 28th 07 04:06 PM
Macro allowing pauses for editing David P. Excel Discussion (Misc queries) 1 May 8th 07 04:43 PM
Protect macro code from viewing/editing Keith[_8_] Excel Programming 5 October 30th 03 02:59 PM


All times are GMT +1. The time now is 01:25 AM.

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"