Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing/Referencing Form Controls :( 1

Status
Not open for further replies.

WMitchellCPQ

Programmer
Sep 28, 2001
54
US
Hi there,

Im having problems passing form controls to a class which i have written. Im using the following approach, which isnt working:--

outside class
------------
classname.addControlData(Multipage.PageName)

inside class
-----------
'class methods

Public Sub addControlData(PageName)
PageName.Control1.Value = "Blaaah"
PageName.Control2.Value = "Blasss"

End

Im not sure how to pass my form and controls properly can someone help

Thanks
Will
 
Use strongly typed parameters.

Assuming Multipage.PageName is an object of type Form

classname.addControlData(Multipage.PageName)

inside class
-----------
'class methods

Public Sub addControlData(byVal PageName as Form)
PageName.Control1.Value = "Blaaah"
PageName.Control2.Value = "Blasss"


Forms/Controls Resizing/Tabbing
Compare Code
Generate Sort Class in VB
Check To MS)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top