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!

Call A function from another class

Status
Not open for further replies.

mchoudhury

Programmer
Nov 26, 2004
71
GB
Hi Guys,
I have class, and on tghat class i want to call a function from another class. I've already specified where that class is within the director in the namespace, but how do you call a function from that class.

1st class - Telephoneusage

2nd class - costpermonth - Function to call is getcostpermonth()
 
try costpermonth.getcostpermonth() if the function is a public function

"If it could have gone wrong earlier and it didn't, it ultimately would have been beneficial for it to have." : Murphy's Ultimate Corollary
 
Depending on how you created 2nd class – costpermonth, you might have to instantiate the class before calling its method.

Dim myClass as New costpermonth
myClass.getcostpermonth()
 
Did you create an instance of costpermonth using the new operator?

Chip H.


____________________________________________________________________
Click here to learn Ways to help with Tsunami Relief
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top