Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You could use application.run
Option Explicit Sub testme1(mystr As String) MsgBox mystr & " from 1" End Sub Sub testme2(mystr As String) MsgBox mystr & " from 2" End Sub Sub testme3(mystr As String) MsgBox mystr & " from 3" End Sub Sub testme4(mystr As String) MsgBox mystr & " from 4" End Sub Sub aaa() Dim iCtr As Long For iCtr = 1 To 4 Application.Run "testme" & iCtr, "hi there" Next iCtr End Sub Whit wrote: How can I call a macro when the name is a variable MacroName = "example" While i <= 14 MacroName = MacroName & i Call MacroName (path) i = i + 1 Loop Cheers -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Call VBScript from VBA, pass variable, return result to macro? | Excel Programming | |||
Define worksheet as variable, then call in macro | Excel Programming | |||
Call procedure using variable | Excel Programming | |||
can I call a procedure using a variable | Excel Programming | |||
Using variable to call worksheets | Excel Programming |