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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passing values to a Module

Status
Not open for further replies.

lode

Programmer
Nov 8, 2001
208
0
0
BE
In my form i have a value from a textbox
How can i pass this value to a module ?
Looks simple but can't find it.

Anybody ?
 
for one try using classes and not modules. but in both you declare public variables

Code:
class lode1

public var1 as string

public sub teller(byval var2 as string)
   return var2 += var1
end sub

end class

and then this in your form

Code:
dim l1 as new lode1

l1.var1 = 1
textbox1.text = l1.teller(2)

or you could loose the dim l1 if you do this

Code:
class lode1

public shared var1 as string

public shared sub teller(byval var2 as string)
   return var2 += var1
end sub

end class


Christiaan Baes
Belgium

What a wonderfull world - Louis armstrong
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top