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!

ActiveX DLL, unable to call Public Function

Status
Not open for further replies.

jlkidd

Programmer
Feb 22, 2001
28
0
0
US
I am writing an ActiveX dll and would like to access it from a module(.bas) file. I have done this before without any problem or confusion. I deleted the premade class and then added a class from the VB Class Builder. I added a method that would accept a date and a text string that was to represent a folder path.

I have now returned to my module and created a reference to the dll. Everything has been saved. I now dimensioned a variable of the ActiveX dll type. This was accepted and I saw the dll name in the drop down menu. I now use that object to call my function, only when I hit the period and expect to see my function choices nothing happens. I have gone back and set the object equal to the dll project now. I am having no problem referencing the dll, I can't reach my functions though.

Thank you for any help given.
 
it sounds like your not referencing your dll properly:
dim objMyDll as MyDllName.MyClassName
 
In addition to referencing the object correctly, make sure the you recompiled the DLL AND correctly registered itafter the new method was added. - Jeff Marler
(please note, that the page is under construction)
 
It is not registered. This is because I am testing it. I have 2 projects within a project group. One is a module and the other an activeX dll. With the module highlighted I can then reference the dll. This I have done. Then normally I have been able to simply dimension a variable of class type of the dll. Then I could use that variable to access the functions and subprocedures contained within that dll. If this is not supposed to work this way or their is something I am doing wrong I would appreciate any information possible. Thanks
B-)
 
try one of these 2 options . . .

1) Compile the DLL and then turn on project compatibility inside of the DLL.

- OR -

2) Make sure that, at the very least, you have project compatibility turned on.

- Jeff Marler
(please note, that the page is under construction)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top