Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi,
Sub test() Dim mc As String, nb As Integer nb = Application.InputBox(prompt:="Choose a number between 1 and 10", Type:=1) If nb 5 Then mc = "This" Else mc = "That" Call MyCode(mc) End Sub Sub MyCode(SubName As String) Application.Run (SubName) End Sub Sub This() MsgBox "This" End Sub Sub That() MsgBox "That" End Sub -- isabelle |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Call a procedure using a variable | Excel Programming | |||
Can a variable be used when declaring an API call ? | 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 |