A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Setting up and Configuration
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

protecting worksheet with outlines



 
 
Thread Tools Display Modes
  #1  
Old October 8th, 2003, 04:47 PM
smiller
external usenet poster
 
Posts: n/a
Default protecting worksheet with outlines

I would like to protect the content of a worksheet with
three outline views. If I uncheck protect contents it
allows others to change data. If checked, I can't change
the views.

  #2  
Old October 9th, 2003, 01:31 AM
Dave Peterson
external usenet poster
 
Posts: n/a
Default protecting worksheet with outlines

If you protect the sheet in code (auto_open/workbook_open??), you can allow
this:

Option Explicit
Sub auto_open()
With Worksheets("sheet1")
.Protect Password:="hi", userinterfaceonly:=True
.EnableOutlining = True
End With
End Sub

It needs to be reset each time you open the workbook. (excel doesn't remember
it after closing the workbook.)

(you could use the workbook_open even under ThisWorkbook, too.)

Don't forget to lock the VBA Project, too. Else you'll have inquisitive types
looking at your code and seeing the password.

Inside the VBE, you can lock the project.
Tools|VBAProject Properties|Protection tab.
Give it a memorable password and lock the project for viewing.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

smiller wrote:

I would like to protect the content of a worksheet with
three outline views. If I uncheck protect contents it
allows others to change data. If checked, I can't change
the views.


--

Dave Peterson

  #3  
Old October 9th, 2003, 02:46 PM
smiller
external usenet poster
 
Posts: n/a
Default protecting worksheet with outlines

Thanks for your help!!!

-----Original Message-----
If you protect the sheet in code

(auto_open/workbook_open??), you can allow
this:

Option Explicit
Sub auto_open()
With Worksheets("sheet1")
.Protect Password:="hi", userinterfaceonly:=True
.EnableOutlining = True
End With
End Sub

It needs to be reset each time you open the workbook.

(excel doesn't remember
it after closing the workbook.)

(you could use the workbook_open even under

ThisWorkbook, too.)

Don't forget to lock the VBA Project, too. Else you'll

have inquisitive types
looking at your code and seeing the password.

Inside the VBE, you can lock the project.
Tools|VBAProject Properties|Protection tab.
Give it a memorable password and lock the project for

viewing.

If you're new to macros, you may want to read David

McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

smiller wrote:

I would like to protect the content of a worksheet

with
three outline views. If I uncheck protect contents it
allows others to change data. If checked, I can't

change
the views.


--

Dave Peterson

.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


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