Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
is it possible to run a macro in another workbook which receives arguments? Let's say I have two workbooks open: The calling wb is WB.xls and the procedure I want to run is in the workbook AnotherWB.xls. Without arguments, everything works fine but if that MyProcedure is 'Procedure is part of AnotherWB.xls Sub MyProcedure (vArg as integer) for i=1 to vArg msgbox (i) next end sub I am not able to do this in worbook WB.xls Run "'AnotherWB.xls'!MyProcedure, 5" Am I doing something wrong??? Thanks Jos Vens |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Run "AnotherWB.xls!MyProcedure", 5
Regards, Tom Ogilvy "Jos Vens" wrote in message ... Hi, is it possible to run a macro in another workbook which receives arguments? Let's say I have two workbooks open: The calling wb is WB.xls and the procedure I want to run is in the workbook AnotherWB.xls. Without arguments, everything works fine but if that MyProcedure is 'Procedure is part of AnotherWB.xls Sub MyProcedure (vArg as integer) for i=1 to vArg msgbox (i) next end sub I am not able to do this in worbook WB.xls Run "'AnotherWB.xls'!MyProcedure, 5" Am I doing something wrong??? Thanks Jos Vens |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Tom!
Jos "Tom Ogilvy" schreef in bericht ... Run "AnotherWB.xls!MyProcedure", 5 Regards, Tom Ogilvy "Jos Vens" wrote in message ... Hi, is it possible to run a macro in another workbook which receives arguments? Let's say I have two workbooks open: The calling wb is WB.xls and the procedure I want to run is in the workbook AnotherWB.xls. Without arguments, everything works fine but if that MyProcedure is 'Procedure is part of AnotherWB.xls Sub MyProcedure (vArg as integer) for i=1 to vArg msgbox (i) next end sub I am not able to do this in worbook WB.xls Run "'AnotherWB.xls'!MyProcedure, 5" Am I doing something wrong??? Thanks Jos Vens |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro - onAction arguments | Excel Worksheet Functions | |||
saving macro from workbook to Personal Macro Workbook | Excel Discussion (Misc queries) | |||
passing arguments from an excel macro to a word macro | Excel Discussion (Misc queries) | |||
Excel Gurus = want a macro in 1 workbook to get info from another workbook = Read please | Excel Programming | |||
Question: Macro overloading, passing variable number of arguments | Excel Programming |