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

Plublic functions

Status
Not open for further replies.

qdtb

Technical User
Mar 14, 2002
12
PR
Hi,
I am doing a little program that has like 3 forms.
my problem is that I need to use some functions created by me let says for example

public function example()

the problem is that when I want to call that function in a form, VB tells me that that sub or function is no defined. Where I have to put or decalre that function????

wright now I put it at the top of the 1 form

Thank you!!!!!!!!!!1
 
Put the public functions into a Module
OR
qualify the name with the name of the form that contains it e.g. form1.example BUT realize that form1 will be loaded if it is not already.
I prefer a module. Use Project / Add Module to create the module and copy over your code. Generate Forms/Controls Resizing/Tabbing Class
Compare Code (Text)
Generate Sort Class in VB or VBScript
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top