Tech Programing


What options do I have to CreateObject(“System.Collections.ArrayList”)?

1 min read

I have a file we share among a lot of people at work. The past five years the code has worked fine, but now a new guy is introduced to the file and he get the (links to other threads about the error) automation error on this part below:

        Dim TillfLevdagar(1 To 14) As String
        ' code that sets some of the array items above

        Dim arr2 As Object

        Set arr2 = CreateObject("System.Collections.ArrayList") ' here it errors
        For Each itm In TillfLevdagar
            If itm <> "" Then arr2.Add CInt(itm)

        For Each itm In arr2
            msg = msg & itm & ","

Since this is a work computer we are very limited in allowing any software to be installed. That includes Microsoft software.
Becuase of this I ask what alternatives do I have to the code above?

Source link



發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *