This is the same Excel 97 question I have posted in http://www.experts-exchange.com (where are the tags gone ?). Perhaps I am luckier here:
Did you ever have the situation that you needed to have the Outlining (or the Autofilter) operational on an protected worksheet and, at the same time, having to use the FillAcrossSheets method because of speed ? Well, it seems that I have stumbled over something which has no reference in the MSKB nor in the internet:
The second Sub simply wipes out the worksheet protection applied by the first one.
Sub EnableGrouping()
With ActiveSheet
.EnableOutlining = True
.Protect contents:=True, DrawingObjects:=True, userInterfaceOnly:=True
End With
End Sub
Sub WhatIsHappeningHere()
Dim x As Variant
x = Array(“Sheet1”, “Sheet2”, “Sheet3”)
Sheets(x).FillAcrossSheets _
Worksheets(“Sheet1”).Range(“A1:C3”)
End Sub
Questions:
a) Do I miss something ?
Is there any other solution than to call the EnableGrouping again after using the FillAcrossSheets
method ?