http://social.msdn.microsoft.com/Forums/en-US/isvvba/thread/6d6065c9-3ed5-49be-941e-48d6f35da3dc
If it's a regular .xla or .xlam add-in, and the procedure you need to call is not in a private module, you can call it using
Application.Run "MyAddIn.xla!ProcedureToRun"
If the procedure is a function that returns a value, use
MyVariable = Application.Run("MyAddIn.xla!ProcedureToRun")
If you need to pass any arguments, put a comma after the procedure name, and list arguments separated by commas:
Application.Run "MyAddIn.xla!ProcedureToRun", Arg1, Arg2
MyVariable = Application.Run("MyAddIn.xla!ProcedureToRun", Arg1, Arg2)
Комментариев нет:
Отправить комментарий