![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 2
|
How do I call a function in one macro from a function in another macro.
Ive tried to use the run method unsuccesfully but surely there must be another way. Regards |
|
|
|
|
|
#2 |
|
New Member
Join Date: Mar 2002
Posts: 33
|
FunctionName(var1, var2)
In some circumstances, you might need to type "Call " at the beginning. If it is really a function, you should be able to call it in the middle of an expression, e.g. Var3 = FunctionName(var1, var2) * var4 Make sure the function is public if it is not in the same module. |
|
|
|
|
|
#3 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Portland, OR USA
Posts: 1,374
|
Quote:
One way: Call MyFuncThatDoesSomething(var1,var2) Second way: MyFuncThatDoesSomething var1, var2 I think I like the Call way, in that it shows that another procedure is being called, but I use both ways in my programs. -rh |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|