I have a collection of modal forms. I want to call one (and only one)by random using (formname).show vbmodal. When I close this form, the program continues to show forms from the collection endlessly.
Printable View
I have a collection of modal forms. I want to call one (and only one)by random using (formname).show vbmodal. When I close this form, the program continues to show forms from the collection endlessly.
Show us some code and we can probably help you.
'in the declarations:
Private frmCorrect As New Collection
'in the sub:
frmCorrect((Int(Rnd * 3)) + 1).Show vbModal
well that should do the trick, put it in a loop, and the code will wait for you to close the modal form