ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Calling functions in different modules (https://www.excelbanter.com/excel-programming/327214-calling-functions-different-modules.html)

CR[_4_]

Calling functions in different modules
 
Using Excel 2000, I have created an add-in (VB_Custom_Functions.xla)
that contains four modules. When I call a function in one module (say
Module 4), how can I make that function call another function in a
different module (say Module 2)?


galimi[_2_]

Calling functions in different modules
 
From module 4, you can call the name of the function directly, OR, you can
preface it with Module2.NameofFunction (parameters)

http://HelpExcel.com

"CR" wrote:

Using Excel 2000, I have created an add-in (VB_Custom_Functions.xla)
that contains four modules. When I call a function in one module (say
Module 4), how can I make that function call another function in a
different module (say Module 2)?



K Dales[_2_]

Calling functions in different modules
 
If they are Public functions they will be accessible to all modules in the
project. However, there is the potential for confusion if 2 functions in
different modules have the same name: if you need to resolve any conflicts
like this, use ModuleName.FunctionName

"CR" wrote:

Using Excel 2000, I have created an add-in (VB_Custom_Functions.xla)
that contains four modules. When I call a function in one module (say
Module 4), how can I make that function call another function in a
different module (say Module 2)?




All times are GMT +1. The time now is 01:15 AM.

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