ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Running a Macro from another Macro (https://www.excelbanter.com/excel-programming/404740-running-macro-another-macro.html)

Stan

Running a Macro from another Macro
 
How do I run a macro from within another macro?

Example: I have a macro (Dount1) which is basically a *Do Until* loop
dependent on the results of a random number generator held in a macro called
*Genrand*.
I want to run Genrand from Dount1 until a certain random number sequence is
generated.

TIA
Stan



Nigel[_2_]

Running a Macro from another Macro
 
Sub Dount1
' your other code

Call GenRand

' your other code
End Sub

The 'Call' is optional

--

Regards,
Nigel




"Stan" wrote in message
...
How do I run a macro from within another macro?

Example: I have a macro (Dount1) which is basically a *Do Until* loop
dependent on the results of a random number generator held in a macro
called *Genrand*.
I want to run Genrand from Dount1 until a certain random number sequence
is generated.

TIA
Stan





All times are GMT +1. The time now is 05:48 PM.

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