I have code written in a VBA Module in Excel. I need to be able to send this xlsm file to other people and when they open it, they can run the macro from a single place. I create a custom tab/group/button on my ribbon, but when I send the file, the tab/group/button isnt there since its a different user profile. I looked up code that would create the custom tab/group/button on workbook open (in the Excel.officeUI file), but when I test it on a different machine with a different user, I get an error when I click on the button saying Excel cant have two workbooks with the same name at the same time. There is no path references in the XML for the file, so not sure why its doing that either:
<mso:customUI xmlns:mso='http://schemas.microsoft.com/office/2009/07/customui'>
<mso:ribbon>
<mso:qat/>
<mso:tabs>
<mso:tab id='reportTab' label='VBA' insertBeforeQ='mso:TabFormat'>
<mso:group id='reportGroup' label='Folders' autoScale='true'>
<mso:button id='runReport' label='Create Folders'
imageMso='CopyFolder' onAction='CreateFolderButtonPress'/>
</mso:group>
</mso:tab>
</mso:tabs>
</mso:ribbon>
</mso:customUI>
Is there any way to link to a Sub in a VBA module that is global (user profile independent)? I know I can go to Developer, then Macros and run it from there, but from a User Interface perspective, I'm looking for one button to hit to execute, that will show on the Excel file all the time
<mso:customUI xmlns:mso='http://schemas.microsoft.com/office/2009/07/customui'>
<mso:ribbon>
<mso:qat/>
<mso:tabs>
<mso:tab id='reportTab' label='VBA' insertBeforeQ='mso:TabFormat'>
<mso:group id='reportGroup' label='Folders' autoScale='true'>
<mso:button id='runReport' label='Create Folders'
imageMso='CopyFolder' onAction='CreateFolderButtonPress'/>
</mso:group>
</mso:tab>
</mso:tabs>
</mso:ribbon>
</mso:customUI>
Is there any way to link to a Sub in a VBA module that is global (user profile independent)? I know I can go to Developer, then Macros and run it from there, but from a User Interface perspective, I'm looking for one button to hit to execute, that will show on the Excel file all the time