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 ??
''''''''''
'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 ??