Question How do I return from a userform to a module

galitnalalaki

New member
Joined
Jun 24, 2010
Messages
2
Programming Experience
Beginner
I am trying to return to a module from a userform and I cannot figure out how to do it. My program is set up so that the module will call userforms at various times to collect/display information but then I want to return to the module after each userform has done its job, and I want to return to the next line of code in the module. Here is a sample of what I've got.

Module Code:

Module Module1
Public Sub Main()
Call System.Windows.Forms.Application.Run(Form1)
'I want to return here after Form1 is done.. say when an Enter Button is clicked
Next line of Code
End Sub
End Module

Form1 Code (when the Enter Button is clicked):

Public Class Form1
Private Sub Enter_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Enter.Click
Me.Hide()
Return
End Sub
End Class

I'm sure there is a simple way to do this. Forgive me, I'm pretty new at this. Thanks in advance.
 
Back
Top