Excel-DNA / Excel-DNA/Samples

DnaComServer - Sample not working

Open
#37 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
135
Forks
83
PR merge metrics
No merged PRs in 30d

Description

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](https://github.com/user-attachments/assets/23a0980b-14e8-498e-adf0-adbd51801589)
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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.