Link to home
Start Free TrialLog in
Avatar of tom_v_olsen
tom_v_olsen

asked on

Excel - Return to routine after calling a form

If in my code, I call a form, then perform a function with the form, how do I return to the location in my original subroutine (the point at which I left in order to goto the form)?  Can I keep the form active while the original subrouting continues?  It will need to go back to the menu.

Thank you.
ASKER CERTIFIED SOLUTION
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Form1.Show True

The True parameter is to set "Modal" which halts the routine until the form unloads.

The alternative is the routing above, but I would avoid
  For l = 0 To 10000000

Instead if creating "I" I would:

Dim endTime As Date
endTime = DateAdd ("S", 5, Now)

and replace "For l = 0 To 10000000" with "While DateEnd < Now"
and "Next " with "Wend"

I
I agree, dentab. It was to demonstrate the method, and would be replaced by the questioner with the actual processing needed.
Does it do what you want, tom_v_olsen?
tom_v_olsen GrahamSkan has answered your question, I only intended to clarify.