Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Group Function on a Protected Worksheet

If you already have the outline applied, you can protect the worksheet in code
(auto_open/workbook_open??).

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

CiaraG wrote:

Someone asked the question a number of weeks ago as to how
to view grouped rows on a protected worksheet.

A number of people replied by advising to enter VB buttons
on the worksheet. Is there no way of allowing grouped
rows to be automatically viewed by using VB code on the
worksheet???? In the same way that a filter can still be
enabled on a protected worksheet.

I have a number of grouped rows on my worksheet that I
would like the user to be able to view, if they wish.

All ideas would be appreciated.

Rgs,

CG

P.s. Happy Christmas!!!


--

Dave Peterson

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
Can I use the subtotal function while a worksheet is protected? Michelle Thompson Excel Worksheet Functions 0 November 30th 09 06:15 PM
How do I show or hide detail for a group in a protected worksheet Gilles FAURE Excel Discussion (Misc queries) 0 November 1st 06 01:47 AM
Tab Function in Protected Worksheet TRM Excel Discussion (Misc queries) 1 September 27th 06 07:37 PM
Group Contraction/Expansion in Protected Worksheet rj Excel Worksheet Functions 0 August 19th 05 08:26 PM
How use group and ungroup functions while worksheet is protected Gabriel De la Garza Excel Worksheet Functions 1 November 17th 04 01:44 AM


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

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"