The subject sums it up...
with WIN10 and 365.
I have created a PERSONAL.XLSB with code that loads a custom tab for my ribbon just by opening a new workbook. I have distributed this PERSONAL.XLSB to another user on the network so they too can load the custom tab for the ribbon just by opening a new workbook. No problems here.
I am getting tripped up with how my buttons on the custom ribbon need to call specific macros.
What I would like to do is have a separate workbook for each tool I am providing. I would like my ribbon button to run a macro contained in another workbook - the published user version of my 'developer' workbook. I want to develop separate tools in separate .xlsm files, publish a debugged copy that is ready for use to a network location, and have all the users access the macros from buttons on a custom ribbon.
Here is the code that creates the button in the custom ribbon:
ribbonXML = ribbonXML + " <mso:group id='ArchiCAD\_Group' label='ArchiCAD Tools' autoScale='true'>" & vbNewLine
ribbonXML = ribbonXML + " <mso:button id='runClmFit' screentip='Adjust Excel to fit ArchiCAD layout guide' supertip='Supertip description' label='Column x Fit' " & vbNewLine
ribbonXML = ribbonXML + "imageMso='AppointmentColor5' onAction='AdjustColumns'/>" & vbNewLine
ribbonXML = ribbonXML + " <mso:button id='runPDF\_Crop' screentip='Crop .pdf file to fit in ArchiCAD layout guide' supertip='Supertip description' label='Crop a .pdf' " & vbNewLine
ribbonXML = ribbonXML + "imageMso='AppointmentColor5' onAction='RunPdfCrop'/>" & vbNewLine
ribbonXML = ribbonXML + " </mso:group>" & vbNewLine
These custom buttons work great when used in the .xlsm file that contains the source code for the macro. The work great with a MsgBox also.
So... I opened a new workbook and the second from last line of [onAction='RunPdfCrop'] is where I am trying to access the macros.
* I have tried [onAction=Application.Run 'Another Workbook.xlsm'!RunPdfCrop]
... with a wide variety of single quote and double quote placement, hoping to get syntax correct. I end up creating incomplete strings with comments by using different mashups of " and '.
* I have tried [onAction='RunPdfCrop']
... where 'RunPdfCrop' is a sub in PERSONAL.XLSB that has the line [Application.Run 'Another Workbook.xlsm'!PDF_CropDetail] to run the external macro from another workbook. I get a message about how the 'RunPdfCrop' cannot even run because it may not be available in this workbook or all macros may be disabled, even though this macro that calls the external macro is in the PERSONAL.XLSB file.
What am I missing?
Can someone point me in the right direction please?
I cannot imagine that this development strategy is so far fetched that it is impossible...
Thanks to all that read this,
Chris