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

VB Newbie DLLs 2

Status
Not open for further replies.
Jul 20, 2001
1,153
0
0
US
Hi All.

I'm well versed in Access and VBA (I know I know, boo, hiss) and I am expanding my knowledge by learning VB.

I've learned to create a public function, and reference it in my queries. Our companies fiscal months end on the last Saturday of the month.

I took it one step further, and compiled it into a DLL. In the Object Browser window, my Class shows (clsWhatMonth) and it has three Methods, WhatMonth, LstSaturday and FirstSunday.

However, I can only use it by first declaring it, as follows:

Private Sub TestMyDLL()
Dim NewWhatMonth As New clsWhatmonth
MsgBox NewWhatMonth.WhatMonth(Now())
End Sub

My whole idea was to add a reference, and use it as you would an intrinsic function. Am I missing something here, or am I always going to have to declare and instanciate it ?? Tyrone Lumley
augerinn@gte.net
 
Hello,

I believe that you can accomplish what you want by setting the Instancing property for your class to 6-GlobalMultiUse. I belive that this setting will allow you to use your class functions as if it were an intrinsic(sp?) control.

Hope that helps
scott
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top