Hi all….I need some help with a macro…I wish to protect a worksheet, but still permit people to use Pivot Tables on that sheet. Presently, I have the following as a macro that will protect/unprotect, reformat the sheet in question:
Sub AF_WEEKLY()
‘
‘ AF_WEEKLY Macro
‘ Macro recorded 2/23/2006 by David J. McNab
‘
‘
ActiveSheet.Unprotect Password:=”open”
Cells.Select
Selection.Columns.AutoFit
Cells.Select
Selection.Rows.AutoFit
Rows(“104:152”).Select
Selection.EntireRow.Hidden = True
Range(“B1″).Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, AllowUsingPivotTables:=True, Scenarios:=True _
, AllowFormattingColumns:=True, Password:=”open”
End Sub
Even thought I have “AllowUsingPivotTables:=True”, Data|Pivot Table and Pivot Chart Report is not available (it is ‘grayed’ out)…..have I used the wrong ‘command’ in my VBA code/macro? Thank you.