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

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
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.
 
Upvote 0

Forum statistics

Threads
1,215,203
Messages
6,123,627
Members
449,109
Latest member
Sebas8956

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
Back
Top