ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Call a Module (https://www.excelbanter.com/excel-programming/343828-call-module.html)

mb

Call a Module
 
How do I call a module from another module?

Thanks,
mb



Jim Thomlinson[_4_]

Call a Module
 
Prefacing a call with the module name is optional when calling a sub or
function in another module but it is ususally a good idea. It also makes the
call easier as intellisense in VB will display all of the public variables,
subs or functions for you when you type the period.

Call module1.myFunction(myArgument)
--
HTH...

Jim Thomlinson


"mb" wrote:

How do I call a module from another module?

Thanks,
mb




Rowan Drummond[_3_]

Call a Module
 
And if the macro is in another workbook then:
Application.Run "WorkbookName!MacroName"

Regards
Rowan

mb wrote:
How do I call a module from another module?

Thanks,
mb




All times are GMT +1. The time now is 08:49 AM.

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