Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel 2010 VBA - Disable Ribbon Button?

Status
Not open for further replies.

DAmoss

Technical User
Jul 23, 2003
169
GB
Hi,

Can anyone show me how to disable / enable the 'Protect Workbook' button using VBA, the button is located under the 'Review' menu option on the ribbon bar.

I've looked at the official Microsoft Control Names list and I believe the one I'm trying to toggle is the following:

Control Name: ReviewProtectWorkbook
Ordering: 820
PolicyID: 894

Any VBA help or pointing me in the right direction would be much appreciated ... this ribbon stuff is obviously trickier than I thought!

Cheers
Don
 
Best I recall, you can't program the ribbon from VBA, but rather yo have to use C# or C++ I forget..

And are you wanting to control it on a per workbook basis or per user basis or what? I'm not terribly sure it's possible, or at least not very easy, on a per workbook basis.

"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top