Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running macros from another workbook
I have a workbook called macros.xlm that is a hidden workbook that
I always open when Excel is opened. If I have another workbook open (say Test.xls) and I create a macro sub test() End sub How do I call a macro from macros.xlm from Test.xls? I have tried: sub test() Run Macros.xlm!A0FormatMeans End sub and a few other things but just cannot figure it out. Lance |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running macros from another workbook
Lance,
The argument to Run should be text. Run "Macros.xlm!A0FormatMeans" Having said that, the .xlm extension has me worried. Are you running Excel 4 macros? -- John Green - Excel MVP Sydney Australia wrote in message ... I have a workbook called macros.xlm that is a hidden workbook that I always open when Excel is opened. If I have another workbook open (say Test.xls) and I create a macro sub test() End sub How do I call a macro from macros.xlm from Test.xls? I have tried: sub test() Run Macros.xlm!A0FormatMeans End sub and a few other things but just cannot figure it out. Lance |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running macros from another workbook
Try
Application.Run "macros.xlm!macroname" You can also use the recorder to get the above. Bob Flanagan Macro Systems http://www.add-ins.com Productivity add-ins and downloadable books on VB macros for Excel wrote in message ... I have a workbook called macros.xlm that is a hidden workbook that I always open when Excel is opened. If I have another workbook open (say Test.xls) and I create a macro sub test() End sub How do I call a macro from macros.xlm from Test.xls? I have tried: sub test() Run Macros.xlm!A0FormatMeans End sub and a few other things but just cannot figure it out. Lance |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running macros from another workbook
No, I am running Office XP. Should I rename Macros.xlm to Macros.xls?
Everything seems to have run fine up to this point. My quick fix to this problem is to simply copy the macros I need from Macros.xlm into the workbook I am currently using. Lance John Green wrote: Lance, The argument to Run should be text. Run "Macros.xlm!A0FormatMeans" Having said that, the .xlm extension has me worried. Are you running Excel 4 macros? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running macros from another workbook
There's nothing wrong with using .xlm and it would even work with Excel 4 macros.
I was just intrigued that you were using an old extension. -- John Green - Excel MVP Sydney Australia wrote in message ... No, I am running Office XP. Should I rename Macros.xlm to Macros.xls? Everything seems to have run fine up to this point. My quick fix to this problem is to simply copy the macros I need from Macros.xlm into the workbook I am currently using. Lance John Green wrote: Lance, The argument to Run should be text. Run "Macros.xlm!A0FormatMeans" Having said that, the .xlm extension has me worried. Are you running Excel 4 macros? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Running Macros in a protected workbook | Excel Discussion (Misc queries) | |||
Running 4 macros at once | Excel Discussion (Misc queries) | |||
Running VB macros | New Users to Excel | |||
running macros from IF | Excel Worksheet Functions | |||
Running Macros in protected workbook | Excel Worksheet Functions |