J
Jay
In a sub procedure how do I recall/restart the sub and maintain the position
in a loop?
Eg (this doesnt work how I need it to work)...
sub Get_Language()
'code here to prompt the user to do something
'...
dim i as integer
dim k as whatever
for i = 1 to 3
if whatever <> "someval" and i < 3 then
'restart this sub and prompt the user to do something
elseif whatever <> "someotherval" and i < 3 then
'restart this sub and prompt the user to do something
elseif i = 3 then
msgox("sorry, exiting app now")
end if
next i
end sub
I need to do the "'code here to prompt the user to do something" part at the
beginning of the sub and everytime the sun is called/recalled, however, the
variable i i not maintained because the sub is restarting. If I seperate
the "'code here to prompt the user to do something" part and call it instead
of the sub itself everything is fine... I just rather have both in the same
sub. I this a possibility?
Thanks a lot.
Jay
in a loop?
Eg (this doesnt work how I need it to work)...
sub Get_Language()
'code here to prompt the user to do something
'...
dim i as integer
dim k as whatever
for i = 1 to 3
if whatever <> "someval" and i < 3 then
'restart this sub and prompt the user to do something
elseif whatever <> "someotherval" and i < 3 then
'restart this sub and prompt the user to do something
elseif i = 3 then
msgox("sorry, exiting app now")
end if
next i
end sub
I need to do the "'code here to prompt the user to do something" part at the
beginning of the sub and everytime the sun is called/recalled, however, the
variable i i not maintained because the sub is restarting. If I seperate
the "'code here to prompt the user to do something" part and call it instead
of the sub itself everything is fine... I just rather have both in the same
sub. I this a possibility?
Thanks a lot.
Jay