Macro shortcut key not working when Using IRibbonControl

sanjid44

New Member
Joined
Aug 30, 2017
Messages
3
I have created a simple macro code and assigned a shortcut key from Macro option (ctrl+Z) and it worked like a charm but when I am using iRibboncontrol then Shortcut key not working. My code given below -
''''''''''
'In Previous code and shortcut key worked well
Sub HideAllExceptActiveSheet()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
If ws.Name <> ActiveSheet.Name Then ws.Visible = xlSheetHidden
Next ws
End Sub
''''''''
Next I have added "Control as iRibboncontrol" and shortcut key not working -

Sub HideAllExceptActiveSheet(Control as iRibboncontrol)
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
If ws.Name <> ActiveSheet.Name Then ws.Visible = xlSheetHidden
Next ws
End Sub

I want to use shortcut key and Ribbon button both for this Macro. What Should i added for that ??
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
I do not understand:
Control as iRibboncontrol" and shortcut key not working -

What is iRibboncontrol ??
 
Upvote 0
It solved Thanks for your reply .. iRibboncontrol use for activate the Custom Ribbon option ... I have made a Custom ribbon button with Custom UI Editor and activate the Ribbon button bypass this code .. Ribbon button worked well with this code but it deactivated my shortcut key .. so I have created a new supportive sub to call the previous macro and it solved ...
 
Upvote 0
This is the same problem I'm running into. I know this post is old, but I'm holding out hope someone will reply. How did you create the "supportive sub" to call the previous macro? I have not been able to get keyboard shortcuts to work once I add iRibbonControl. Thanks.
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,631
Latest member
a_potato

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