User`s guide
Using Multiple Files and Variable Arguments
4-15
Figure 4-12: Four Different Calls to mysum
This illustration runs when the Excel file is opened. To reactivate the
illustration, make the appropriate cell active. Then press
F2 followed by Enter.
Illustration 6: myprimes Macro
In this illustration the macro myprimes calls the function myprimes.m with an
initial value of 10 in cell A42. The function returns all the prime numbers less
than 10 to cells B42 through E42.
Figure 4-13: myprimes Macro
To execute the macro, from the main Excel window (not the Visual Basic
Editor), display the
Macro dialog either by selecting the Alt and F8 keys at the
same time or by selecting the
Macros option from Tools -> Macro.
Select
myprimes from the list and click Run.