This command is not working for me, Application.CommandBars("PivotTable Field List").Enabled = True

mpumarad

New Member
Joined
Jun 24, 2014
Messages
1
I have a password-protected workbook that at one point in time I set the "PivotTable Field List" to not be shown. Now I need to make an update to the Pivot Table Fields and the icon shows but it is grayed out. I have tried
"Application.CommandBars("PivotTable Field List").Enabled = True"

but it simply refuses to work.

If I open another spreadsheet with pivot tables, the "PivotTable Field List" button will show up.

A few macros run via workbook_opens (). I have added these. The worksheet protection commands work but the

Worksheets("AppendixA_Out").Unprotect Range("Admin_PW").Value
Application.CommandBars("PivotTable Field List").Enabled = True
Worksheets("AppendixA_Out").Protect Range("Admin_PW").Value, _
AllowUsingPivotTables:=True, AllowFiltering:=True, Userinterfaceonly:=True


I created a test macro with just two instructions,
Application.CommandBars("PivotTable Field List").Enabled = True
MsgBox Application.CommandBars("PivotTable Field List").Enabled

I expect the message box to show "True" but it shows "False". Obviously, Excel is not updating the value of that setting even though I enter the command.
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top