Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default Protection and Enable Outlining

Hi Gurus !

I have (successfully) used in my code (7-8 month ago) :

Private Sub Workbook_Open()

Dim Sh As Worksheet

For Each Sh In ActiveWorkbook.Sheets
Sh.EnableOutlining = True
Next Sh

End Sub

.... but now it doesn't work ;-(

Could you please help me ? What am I doing wrong ?
I have Office 2002, SP3 (from About Microsoft Excel window)

Thank you for your answers in advance !
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 128
Default Protection and Enable Outlining

I have had this same problem this week, that is if the error is'1004' range
or class method

I inserted

sheets("yoursheetname").select

I know it seems simply but it fixed it mine!

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200601/1
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Protection and Enable Outlining

I think I'd specify the password, too:

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

If the passwords for all the sheets are the same, you could just loop through
the sheets. If the passwords are different, you'll need to account for this,
too.

Vlado Sveda wrote:

Hi Gurus !

I have (successfully) used in my code (7-8 month ago) :

Private Sub Workbook_Open()

Dim Sh As Worksheet

For Each Sh In ActiveWorkbook.Sheets
Sh.EnableOutlining = True
Next Sh

End Sub

... but now it doesn't work ;-(

Could you please help me ? What am I doing wrong ?
I have Office 2002, SP3 (from About Microsoft Excel window)

Thank you for your answers in advance !


--

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
HOW TO DO ENABLE ENABLE THE QUERY PARAMETER BUTTON? CPW Excel Worksheet Functions 1 January 21st 10 06:31 PM
Grouping and Outlining in Excel using sheet protection Rich Excel Discussion (Misc queries) 2 March 19th 09 07:28 PM
Grouping/Outlining in Excel 2003 with Protection turned on Rich Excel Discussion (Misc queries) 1 March 19th 09 03:20 PM
Subtotal and outlining Abe[_2_] Excel Discussion (Misc queries) 7 November 7th 08 06:54 PM
Enable outlining in a protected worksheet johnb Excel Discussion (Misc queries) 8 October 12th 07 08:15 PM


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