Forgive me I am sure this is really easy, but I do not know VB at all, and I got stuck with a program.

I am showing a form by calling this...

Form1.Show 1

This opens another "window" which collects data from the user, then the user can either hit the OK or CANCEL button. How does the calling function know what button the user pressed?

I assume that you could do something like this...
ButtonPressed = Form1.Show 1

but you can not.

Can any one help me answer this easy question?


Thanks a lot, I appricate it.