![]() |
Macro links to other workbooks
I've exported several macros to be imported into other workbooks when they
are first used. When a macro is imported it retains the link to the original workbook. How do I remove the links? It's likely I'm missing somehting obvious but I'm lost for looking. -- Jim |
Macro links to other workbooks
Correction: they aren't linked to the original workbook. It's the name of
thisworkbook. When I write a macro that creates the buttons, I can't put thisworkbook.name in the "OnAction" command. -- Jim "Jim G" wrote: I've exported several macros to be imported into other workbooks when they are first used. When a macro is imported it retains the link to the original workbook. How do I remove the links? It's likely I'm missing somehting obvious but I'm lost for looking. -- Jim |
Macro links to other workbooks
This kind of thing works for me:
..OnAction = "'" & ThisWorkbook.Name & "'!" & "somemacronamehere" Jim G wrote: Correction: they aren't linked to the original workbook. It's the name of thisworkbook. When I write a macro that creates the buttons, I can't put thisworkbook.name in the "OnAction" command. -- Jim "Jim G" wrote: I've exported several macros to be imported into other workbooks when they are first used. When a macro is imported it retains the link to the original workbook. How do I remove the links? It's likely I'm missing somehting obvious but I'm lost for looking. -- Jim -- Dave Peterson |
Macro links to other workbooks
Thanks Dave, worked perfectly. The double quotes and apostrophe's get me
every time! -- Jim "Dave Peterson" wrote: This kind of thing works for me: ..OnAction = "'" & ThisWorkbook.Name & "'!" & "somemacronamehere" Jim G wrote: Correction: they aren't linked to the original workbook. It's the name of thisworkbook. When I write a macro that creates the buttons, I can't put thisworkbook.name in the "OnAction" command. -- Jim "Jim G" wrote: I've exported several macros to be imported into other workbooks when they are first used. When a macro is imported it retains the link to the original workbook. How do I remove the links? It's likely I'm missing somehting obvious but I'm lost for looking. -- Jim -- Dave Peterson |
All times are GMT +1. The time now is 10:41 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com