Give VB 6, and 4 subs
Private Sub Update1()
'bla bla bla bla bla
end sub
Private Sub Update2()
'bla bla bla bla bla
end sub
Private Sub Update3()
'bla bla bla bla bla
End Sub
----->Here is the sub I need some help with
Private Sub DoUpdates
Dim iCounter as integer
dim iMax as integer
dim stString as String
'Have some code here to figure out which subs to run
'Will be running Update1, Update2, Update3....in successive
'order. But will not be runnign them out of order. i.e. 1 and 3......Just 1 then 2 then 3 or just 1 then 2 or just 1
for icounter = 1 to imax
---->Here is where I need help
call Updates & cstr(icounter)
next icounter
end sub
Basically want to know if it is possible to call a sub that I dynamically create the sub name.
I do not want to have to do a case on my Imax and do individual call statements to the subs.
On three subs it would not be bad but on 45 it would be
call updates 1
call updates 2
etc etc call updates 45
and then another case where I could start at 40 and have to call updates 40
call updates 41
et etc call updates 45
Thanks
Andy Baldwin
"Testing is the most overlooked programming language on the books!
Private Sub Update1()
'bla bla bla bla bla
end sub
Private Sub Update2()
'bla bla bla bla bla
end sub
Private Sub Update3()
'bla bla bla bla bla
End Sub
----->Here is the sub I need some help with
Private Sub DoUpdates
Dim iCounter as integer
dim iMax as integer
dim stString as String
'Have some code here to figure out which subs to run
'Will be running Update1, Update2, Update3....in successive
'order. But will not be runnign them out of order. i.e. 1 and 3......Just 1 then 2 then 3 or just 1 then 2 or just 1
for icounter = 1 to imax
---->Here is where I need help
call Updates & cstr(icounter)
next icounter
end sub
Basically want to know if it is possible to call a sub that I dynamically create the sub name.
I do not want to have to do a case on my Imax and do individual call statements to the subs.
On three subs it would not be bad but on 45 it would be
call updates 1
call updates 2
etc etc call updates 45
and then another case where I could start at 40 and have to call updates 40
call updates 41
et etc call updates 45
Thanks
Andy Baldwin
"Testing is the most overlooked programming language on the books!