i want to be able to expose an array that is a property of a class. i want to take that array and populate a list box with its values
i have a class CCustomer
it looks like this
Private arrFilesNotParsed As Variant
Public Property Get FilesNotParsed() As Variant
FilesNotParsed = arrFilesNotParsed()
private sub populatearray ()
dim notparsedcounter as integer
dim arrNotParsed () as variant
'some things happen here in a For Each objFile In objFolder.Files loop
' at the end of each loop i have...
NotParsedCounter = NotParsedCounter + 1
ReDim Preserve arrNotParsed(NotParsedCounter)
arrNotParsed(NotParsedCounter) = varReporterName ' varReporterName is a name of a file that has not parsed
arrFilesNotParsed = arrnotparsed
so i want to pass values to an array in the loop, then save it to a property.
then i want to allow a form to go get that property and the values it holds.
and then in the form populate a list box with the values in the array
currently in my form i have...
Private function PopulateListBox(arrNotParsedList As Variant) as boolean
Dim i As Integer
For i = LBound(arrNotParsedList) To UBound(arrNotParsedList)
lstFilesNotParsed.AddItem (arrNotParsedList), (i)
PopulateListBox = true