View Single Post
  #7 (permalink)  
Old September 6th, 2004, 03:37 AM
jaucourt jaucourt is offline
Friend of Wrox
Join Date: Jul 2003
Location: York, , United Kingdom.
Posts: 142
Thanks: 0
Thanked 2 Times in 2 Posts

quote:Originally posted by MKri
 Thanks, but can you tell me explicitly -
how to "pass ... a reference to the form itself ..." from the form to the module procedure, so that the module procedure adresses back the
form (enters certain number to the form's text box).

Right - make the form you're interested in a parameter in the module method, e.g.
Public Sub FormMethod(ByRef refFrm as Form1)
    ' do stuff with refFrm here...
End Sub
Then back in the form, say when someone presses a button:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As  System.EventArgs) Handles Button1.Click
    ' call the module method, passing in this form as a parameter...
End Sub
Reply With Quote