Custom class collection

bbeaucage

New Member
Joined
Apr 29, 2020
Messages
2
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2013
  5. 2011
  6. 2010
  7. 2007
Platform
  1. Windows
I created a COM enabled class in VB.Net.

...
<ComVisible(True)>
<ClassInterface(ClassInterfaceType.None)>
<ProgId("Integration.PostInvoice")>
Public Class PostInvoice

Public Property InvoiceNumber As String
Public Property FileName As String
Public Property TransType As String
Public Property CustomerName As String
Public Property JournalDate As Date
Public Property ErrorMessage As String
Public Property DetailLines As New List(Of InvoiceDetail)
....

In Excel, I can create a new instance of the PostInvoice class, and I can see all of the properties, except for DetailLines.

The DetailLines property doesn't show, so I cannot .Add an item to that collection. In VB.Net, the DetailLines property is accessible.

Any suggestions would be greatly appreciated.
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

bbeaucage

New Member
Joined
Apr 29, 2020
Messages
2
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2013
  5. 2011
  6. 2010
  7. 2007
Platform
  1. Windows
I think I figured it out. List(Of ...) is not exposed through COM, so need to create a custom collection class with all of the proper members and methods.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,661
Messages
5,838,648
Members
430,559
Latest member
jm5498

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top