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.
 

Some videos you may like

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

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.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,940
Messages
5,598,975
Members
414,270
Latest member
skipolmsted

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