FireFighter1005
New Member
- Joined
- Sep 2, 2015
- Messages
- 5
Hi,
I created a set of macros that I need to be able to call whatever the workbook is openned.
For example:
Then in order to make accessible with every workbook, I created a macro button in the quick access toolbar.
Which produced the following entry in the qat file:
Normally, I would remove the fully qualified path and keep only the macro name.
It worked in the past.
But while writing this post, I got this idea to reference the module in which the macro would be found.
So I tested it.
I exported the qat file into "Excel Customization.exportedUI", then openned it using VSCode (so I could formet the XML code).
I could find the entry at the end of tag mso:sharedControls<mso:sharedcontrols><mso:sharedcontrols>.
I converted it so it looked like this:
I tried it in the curent workbook and it worked!
Even though I know this forums is meant to ask questions, I though it would be nice to provide the answer since I found it.
In case anybody else runs into the same issue.
Feel free to get rid of this post if moderators find it uselss or a duplicate of some other post. (sorry I did search but I couldn't find anything related to this issue)</mso:sharedcontrols></mso:sharedcontrols>
I created a set of macros that I need to be able to call whatever the workbook is openned.
For example:
Code:
Public Sub ResetFullLayout()
'**----------------------------------------------------
'**
'** Purpose: Reset layout to view all columns and all data
'**
'** Input: none
'**
'** Ouput: none
'**
Columns("A:AA").Select
Selection.EntireColumn.Hidden = False
Range("L23").Select
ActiveSheet.ShowAllData
End Sub
Then in order to make accessible with every workbook, I created a macro button in the quick access toolbar.
Which produced the following entry in the qat file:
Code:
[COLOR=#D4D4D4][FONT=Consolas][COLOR=#808080]<[/COLOR][COLOR=#569cd6]mso:button[/COLOR] [COLOR=#9cdcfe]idQ[/COLOR]=[COLOR=#ce9178]"x1:https:__oursharepoint_sites_Shared_Documents_OU_00059_1715_Hierarchy.xlsm_shMain.ResetFullLayout"[/COLOR] [COLOR=#9cdcfe]visible[/COLOR]=[COLOR=#ce9178]"true"[/COLOR] [COLOR=#9cdcfe]label[/COLOR]=[COLOR=#ce9178]"modL6.ClearTable"[/COLOR] [COLOR=#9cdcfe]imageMso[/COLOR]=[COLOR=#ce9178]"ListMacros"[/COLOR] [COLOR=#9cdcfe]onAction[/COLOR]=[COLOR=#ce9178]"https://oursharepoint.com/sites/MainSite/SharedDocuments/OU_00059_1715_Hierarchy.xlsm!shMain.ResetFullLayout"[/COLOR][COLOR=#808080]/>[/COLOR][/FONT][/COLOR]
Normally, I would remove the fully qualified path and keep only the macro name.
It worked in the past.
But while writing this post, I got this idea to reference the module in which the macro would be found.
So I tested it.
I exported the qat file into "Excel Customization.exportedUI", then openned it using VSCode (so I could formet the XML code).
I could find the entry at the end of tag mso:sharedControls<mso:sharedcontrols><mso:sharedcontrols>.
I converted it so it looked like this:
Code:
[COLOR=#D4D4D4][FONT=Consolas][COLOR=#808080]<[/COLOR][COLOR=#569cd6]mso:button[/COLOR] [COLOR=#9cdcfe]idQ[/COLOR]=[COLOR=#ce9178]"x1:ResetFullLayout"[/COLOR] [COLOR=#9cdcfe]visible[/COLOR]=[COLOR=#ce9178]"true"[/COLOR] [COLOR=#9cdcfe]label[/COLOR]=[COLOR=#ce9178]"ResetFullLayout"[/COLOR] [COLOR=#9cdcfe]imageMso[/COLOR]=[COLOR=#ce9178]"ListMacros"[/COLOR] [COLOR=#9cdcfe]onAction[/COLOR]=[COLOR=#ce9178]"shMain.ResetFullLayout"[/COLOR][COLOR=#808080]/>[/COLOR][/FONT][/COLOR]
I tried it in the curent workbook and it worked!
Even though I know this forums is meant to ask questions, I though it would be nice to provide the answer since I found it.
In case anybody else runs into the same issue.
Feel free to get rid of this post if moderators find it uselss or a duplicate of some other post. (sorry I did search but I couldn't find anything related to this issue)</mso:sharedcontrols></mso:sharedcontrols>