Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I'm trying to create a generic sub that will call Application.Run with a Worksheet.Module.Sub passed to it and also a variable number of arguments. Is this possible? For example, if wishing made it so, it would run like this: Sub app_run(macro_to_run as string, params as variant) Application.Run macro_to_run, params End Sub In my dreams, I'd call it something like this: Call app_run("MyBook.xls!MyModule.MyMacro", array("test 1", 1) And lo and behold MyMacro would run: Sub MyMacro(str1 as String, lng1 as Long) .... If that's not possible, is there any way to pass one string to my app_run sub and have it parsed for the Workbook.Module.Macro and the args, e.g.: Call app_run(("MyBook.xls!MyModule.MyMacro, test1, 1") Thanks in Advance, Doug |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Application.run and ByRef arguments | Excel Programming | |||
Passing Variable Number of Arguments to a Sub | Excel Discussion (Misc queries) | |||
application.dialogs(xlDialogPrint) - arguments | Excel Programming | |||
writing a Function with a variable number of arguments | Excel Programming | |||
Question: Macro overloading, passing variable number of arguments | Excel Programming |