Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Grouping & collasping in a protected worksheet

HELP!

I have created an Excel form and created groups that can
be expanded or collapsed by the user. However, once I
protect the sheet the user is denied access to the +/-
button that will perform the function. I have tried
adding a command button to use as a macro but the macro I
recorded won't perform the expand & collapse feature. Any
one have an alternative method?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 79
Default Grouping & collasping in a protected worksheet

for Excel 2002, you can use the code below. Most setting are
self-explanatory, the only thing is the last line - .EnableOutlining - this
allows to enable outline symbols to collapse/expand spreadsheet.

Best -
RADO

Public Sub Set_Protection()
' Protects worksheet and enables outline symbols

With Sheets("MySheet")
.Protect _
DrawingObjects:=True, _
Contents:=True, _
Scenarios:=True, _
UserInterfaceOnly:=True, _
AllowFormattingCells:=True, _
AllowFormattingColumns:=True, _
AllowFormattingRows:=True, _
AllowInsertingColumns:=False, _
AllowInsertingRows:=False, _
AllowInsertingHyperlinks:=True, _
AllowDeletingColumns:=False, _
AllowDeletingRows:=False, _
AllowSorting:=True, _
AllowFiltering:=True, _
AllowUsingPivotTables:=True

.EnableSelection = xlNoRestrictions
.EnableOutlining = True
End with
End Sub



"Janice" wrote in message
...
HELP!

I have created an Excel form and created groups that can
be expanded or collapsed by the user. However, once I
protect the sheet the user is denied access to the +/-
button that will perform the function. I have tried
adding a command button to use as a macro but the macro I
recorded won't perform the expand & collapse feature. Any
one have an alternative method?



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Grouping & collasping in a protected worksheet

I am running Excell 2000. Will this still work?

-----Original Message-----
for Excel 2002, you can use the code below. Most setting

are
self-explanatory, the only thing is the last line -

.EnableOutlining - this
allows to enable outline symbols to collapse/expand

spreadsheet.

Best -
RADO

Public Sub Set_Protection()
' Protects worksheet and enables outline symbols

With Sheets("MySheet")
.Protect _
DrawingObjects:=True, _
Contents:=True, _
Scenarios:=True, _
UserInterfaceOnly:=True, _
AllowFormattingCells:=True, _
AllowFormattingColumns:=True, _
AllowFormattingRows:=True, _
AllowInsertingColumns:=False, _
AllowInsertingRows:=False, _
AllowInsertingHyperlinks:=True, _
AllowDeletingColumns:=False, _
AllowDeletingRows:=False, _
AllowSorting:=True, _
AllowFiltering:=True, _
AllowUsingPivotTables:=True

.EnableSelection = xlNoRestrictions
.EnableOutlining = True
End with
End Sub



"Janice" wrote in

message
...
HELP!

I have created an Excel form and created groups that can
be expanded or collapsed by the user. However, once I
protect the sheet the user is denied access to the +/-
button that will perform the function. I have tried
adding a command button to use as a macro but the macro

I
recorded won't perform the expand & collapse feature.

Any
one have an alternative method?



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Grouping & collasping in a protected worksheet

Janice,

It won't work in 2000. If you have a macro that works on an unprotected
sheet, you just need to add "UserInterfaceOnly" to your Protect statement
and the macro will work with a protected sheet:

ActiveSheet.Protect UserInterfaceOnly:=True 'specify the appropriate sheet

This Protect statement needs to run each time the workbook opens because
UserInterfaceOnly does not "stick" when the workbook is closed.

hth,

Doug

wrote in message
...
I am running Excell 2000. Will this still work?

-----Original Message-----
for Excel 2002, you can use the code below. Most setting

are
self-explanatory, the only thing is the last line -

.EnableOutlining - this
allows to enable outline symbols to collapse/expand

spreadsheet.

Best -
RADO

Public Sub Set_Protection()
' Protects worksheet and enables outline symbols

With Sheets("MySheet")
.Protect _
DrawingObjects:=True, _
Contents:=True, _
Scenarios:=True, _
UserInterfaceOnly:=True, _
AllowFormattingCells:=True, _
AllowFormattingColumns:=True, _
AllowFormattingRows:=True, _
AllowInsertingColumns:=False, _
AllowInsertingRows:=False, _
AllowInsertingHyperlinks:=True, _
AllowDeletingColumns:=False, _
AllowDeletingRows:=False, _
AllowSorting:=True, _
AllowFiltering:=True, _
AllowUsingPivotTables:=True

.EnableSelection = xlNoRestrictions
.EnableOutlining = True
End with
End Sub



"Janice" wrote in

message
...
HELP!

I have created an Excel form and created groups that can
be expanded or collapsed by the user. However, once I
protect the sheet the user is denied access to the +/-
button that will perform the function. I have tried
adding a command button to use as a macro but the macro

I
recorded won't perform the expand & collapse feature.

Any
one have an alternative method?



.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Grouping & collasping in a protected worksheet

I think Doug meant to include the enableoutlining line:

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



Doug wrote:

Janice,

It won't work in 2000. If you have a macro that works on an unprotected
sheet, you just need to add "UserInterfaceOnly" to your Protect statement
and the macro will work with a protected sheet:

ActiveSheet.Protect UserInterfaceOnly:=True 'specify the appropriate sheet

This Protect statement needs to run each time the workbook opens because
UserInterfaceOnly does not "stick" when the workbook is closed.

hth,

Doug

wrote in message
...
I am running Excell 2000. Will this still work?

-----Original Message-----
for Excel 2002, you can use the code below. Most setting

are
self-explanatory, the only thing is the last line -

.EnableOutlining - this
allows to enable outline symbols to collapse/expand

spreadsheet.

Best -
RADO

Public Sub Set_Protection()
' Protects worksheet and enables outline symbols

With Sheets("MySheet")
.Protect _
DrawingObjects:=True, _
Contents:=True, _
Scenarios:=True, _
UserInterfaceOnly:=True, _
AllowFormattingCells:=True, _
AllowFormattingColumns:=True, _
AllowFormattingRows:=True, _
AllowInsertingColumns:=False, _
AllowInsertingRows:=False, _
AllowInsertingHyperlinks:=True, _
AllowDeletingColumns:=False, _
AllowDeletingRows:=False, _
AllowSorting:=True, _
AllowFiltering:=True, _
AllowUsingPivotTables:=True

.EnableSelection = xlNoRestrictions
.EnableOutlining = True
End with
End Sub



"Janice" wrote in

message
...
HELP!

I have created an Excel form and created groups that can
be expanded or collapsed by the user. However, once I
protect the sheet the user is denied access to the +/-
button that will perform the function. I have tried
adding a command button to use as a macro but the macro

I
recorded won't perform the expand & collapse feature.

Any
one have an alternative method?


.


--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Grouping & collasping in a protected worksheet

Dave,

Actually, I was just plain wrong, but thanks for your diplomacy <g. Thanks
to you experts, though, I do keep learning, even if at other's expense.

Thanks,

Doug

"Dave Peterson" wrote in message
...
I think Doug meant to include the enableoutlining line:

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



Doug wrote:

Janice,

It won't work in 2000. If you have a macro that works on an unprotected
sheet, you just need to add "UserInterfaceOnly" to your Protect

statement
and the macro will work with a protected sheet:

ActiveSheet.Protect UserInterfaceOnly:=True 'specify the appropriate

sheet

This Protect statement needs to run each time the workbook opens because
UserInterfaceOnly does not "stick" when the workbook is closed.

hth,

Doug

wrote in message
...
I am running Excell 2000. Will this still work?

-----Original Message-----
for Excel 2002, you can use the code below. Most setting
are
self-explanatory, the only thing is the last line -
.EnableOutlining - this
allows to enable outline symbols to collapse/expand
spreadsheet.

Best -
RADO

Public Sub Set_Protection()
' Protects worksheet and enables outline symbols

With Sheets("MySheet")
.Protect _
DrawingObjects:=True, _
Contents:=True, _
Scenarios:=True, _
UserInterfaceOnly:=True, _
AllowFormattingCells:=True, _
AllowFormattingColumns:=True, _
AllowFormattingRows:=True, _
AllowInsertingColumns:=False, _
AllowInsertingRows:=False, _
AllowInsertingHyperlinks:=True, _
AllowDeletingColumns:=False, _
AllowDeletingRows:=False, _
AllowSorting:=True, _
AllowFiltering:=True, _
AllowUsingPivotTables:=True

.EnableSelection = xlNoRestrictions
.EnableOutlining = True
End with
End Sub



"Janice" wrote in
message
...
HELP!

I have created an Excel form and created groups that can
be expanded or collapsed by the user. However, once I
protect the sheet the user is denied access to the +/-
button that will perform the function. I have tried
adding a command button to use as a macro but the macro
I
recorded won't perform the expand & collapse feature.
Any
one have an alternative method?


.


--

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
Grouping on protected worksheets wnwilkerson Excel Worksheet Functions 4 April 22nd 10 09:15 PM
Grouping Function on protected sheet vivi Excel Discussion (Misc queries) 1 August 14th 09 09:59 AM
Protected cells and grouping JimS Excel Discussion (Misc queries) 1 January 5th 06 03:28 AM
Grouping in a protected sheet Werner Rohrmoser Excel Discussion (Misc queries) 2 September 13th 05 08:46 AM
Grouping in protected sheets Maia Excel Discussion (Misc queries) 1 January 3rd 05 04:04 PM


All times are GMT +1. The time now is 04:05 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"