I maintain a personal workbook of Subs that I use via a Custom toolbar. I am working on a project in which there is a sub that I want to call regularly from the toolbar. But I save the workbook under development several times a day to maintain a go-back capability. Since the workbook name changes each time, the toolbar is tied to the Sub in an out of date workbook.
I want to keep a Sub in my personal macro workbook that calls a sub in the currently open workbook - any ideas how? I made it public but that didn't do it. I tried transferring the code across but it refers to variables (even global) that aren't accessible to the personal macro workbook.
ActiveWorkbookand you wouldn't need a second macro. However, referring to the ActiveWorkbook holds its own dangers. Consider building checks into your macro that prevent it from changing a wrong workbook. For example, if the name change only involves a date/time change, look for the core name in the macro. Post it here for modification suggestions. - Variatus