0

Feel like this should be really simple but. I have an excel program that picks a value from a list, searches for a file in our system, and outputs if the file is there or not. Works great if I use:

set missing_file = createobject("System.collections.arraylist")
missing_file.add "Missing file"

However that requires .net 3.5 to be loaded on everyone's computers which I guess is too difficult for people to do.

Ive tried using

dim missing_file as New List(of string)

but excel errors out with a "compile error expected end of statement"

Is there an alternative in the .net 4 that is similar to Arraylist or a different way to add things to a list of indeterminate length?

braX
  • 11,506
  • 5
  • 20
  • 33
  • Feel free to explain further, but are you trying to build a [string array](https://stackoverflow.com/questions/19369132/declare-and-initialize-string-array-in-vba) and [redim](https://www.automateexcel.com/vba/dynamic-array-redim-preserve/)? – Sgdva Feb 08 '22 at 22:08
  • 1
    yeah pretty much. I was able to use the redim to solve my problem. didnt think about that thanks. – Zach Crouse Feb 08 '22 at 22:39

0 Answers0