Samples icon indicating copy to clipboard operation
Samples copied to clipboard

DnaComServer - Sample not working

Open Mathefreak007 opened this issue 1 year ago • 0 comments

I followed the instructions in the sample\DNAComServer.

When starting Excel in debug mode the =DnaComServerHello() works fine in the sheet.

Using the functions in VBA with early or late binding isn't working.

Sub TestLateBound()
        Dim dnaComServer As Object
        Dim hello As String
        Dim result As Double
    
        Set dnaComServer = CreateObject("DnaComServer.ComLibrary")
        hello = dnaComServer.ComLibraryHello()
        result = dnaComServer.Add(1, 2)
    
        Debug.Print hello, result
End Sub

Image Runtime error 424 - object required.

Similar with early binding. Set the reference on the tlb is fine. But then an error occurs when starting the sub.

Are there any hints what to do to fix that issue?

Mathefreak007 avatar Jan 17 '25 15:01 Mathefreak007