ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Function Call Specified at Run Time rather than Compile Time? (https://www.excelbanter.com/excel-programming/339499-function-call-specified-run-time-rather-than-compile-time.html)

Mac Lingo[_2_]

Function Call Specified at Run Time rather than Compile Time?
 
I want to call a function which is specified at call time rather than
compile time.

In other words I need to do something like
Call FunctionNamed(X)( Arg1, Arg2,...)
which would involk the Function Named "X" with the associated arg list.

Is there a way to do this in VBA?
Thanks,
Mac Lingo



Tom Ogilvy

Function Call Specified at Run Time rather than Compile Time?
 
sFuncName = "MyMacro"
Application.Run sFuncName, arg1, arg2

--
Regards,
Tom Ogilvy


"Mac Lingo" wrote in message
ink.net...
I want to call a function which is specified at call time rather than
compile time.

In other words I need to do something like
Call FunctionNamed(X)( Arg1, Arg2,...)
which would involk the Function Named "X" with the associated arg list.

Is there a way to do this in VBA?
Thanks,
Mac Lingo






All times are GMT +1. The time now is 02:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com