View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
PraxisPete PraxisPete is offline
external usenet poster
 
Posts: 25
Default DLL Entry Points

Thanks for your reply DM Unseen

This is the code used in VB6 to create the dll.

Private Sub AddinInstance_OnConnection(ByVal Application As Object, _
ByVal ConnectMode As AddInDesignerObjects.ext_ConnectMode, _
ByVal AddInInst As Object, custom() As Variant)
On Error Resume Next
AddInInst.object = Me
End Sub

Private Sub AddInMsg()
MsgBox "This Message is from a dll addin"
End Sub

And this bit of code in VBA to call it

Private Declare Sub AddInMsg Lib "MySubAddIn.dll" ()

Private Sub CommandButton2_Click()
Call AddInMsg
End Sub

Any suggestions why its not found?

Many thanks


"DM Unseen" wrote:

DLL entry points are the "directory listing" of a DLL. without it the
external programs cannot investigate the DLL, although programmers with
the right docs could access the functions by number(notr by name).

VBA only allows access to DLL by name. the name of the DLL function
probably is not found so maybe misspelled, or maybe the wrong DLL is
called