Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Executing a subroutine from within a loop
This should work but it does not. The macro just steps over the
subroutine message without executing it. What am I missing? -VBA 2003 dim ii as integer For ii=1 to 3 message next ii Public Sub Message() MsgBox "Time to take a break!" End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Executing a subroutine from within a loop
Hi Jeff,
it worked for me. Of course I had to copy the loop into a blank Sub that I've called MessageRunner Public Sub MessageRunner() Dim ii As Integer For ii = 1 To 3 Message Next ii End Sub Public Sub Message() MsgBox "Time to take a break!" End Sub Ken Johnson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Call a subroutine using variable subroutine name | Excel Discussion (Misc queries) | |||
SUBROUTINE HELP | Excel Discussion (Misc queries) | |||
Calling a subroutine in a loop | Excel Programming | |||
end subroutine | Excel Programming | |||
Calling a function from a subroutine loop | Excel Programming |