Reputation: 445
When I try to access File > Options I get something like this:
Does someone know how can I enable the Options button via VBA?
What I have tried so far:
Sub enableOptionButton()
Application.CommandBars("Options").Enabled = True
Application.CommandBars("Tools").Enabled = True
Application.CommandBars("File").Enabled = True
End Sub
Upvotes: 2
Views: 2136
Reputation: 25663
The menus in the most recent versions of Office are controlled through Ribbon XML. Ribbon XML in a workbook or in an Add-in can change the default UI - there's nothing you can do about this with VBA. The CommandBars object model doesn't affect Ribbon controls.
So you need to figure out what's changing the Ribbon XML - could be Ribbon XML that's part of a workbook or part of an Add-in - and change that Ribbon XML or remove the add-in.
Upvotes: 1