The advantage is that it is better to use when distributing a VBA application to a user. The disadvantage of late binding is that we don’t have access to the Intellisense. We use CreateObject to create the ArrayList using late binding: ' Sub UsingArrayList()ĭim coll As Object Set coll = CreateObject( "") Like all external libraries we can create the ArrayList using early and late binding. For the purpose of this article, I will refer to it as the VBA ArrayList. As you would expect, the ArrayList has a built-in sort, array conversion and other functionality that you would expect in a modern programming language. The ArrayList is the same one that is used in the language C#. It is not part of VBA, but it is in an external library which we can access easily. The ArrayList is similar to the VBA built-in Collection. Item - the item to remove from the ArrayListĢ. Set list = CreateObject( "")įind the position of an item in the ArrayList Sheet1.Range("A3").Resize(list.Count, 1).Value = WorksheetFunction.Transpose(list.ToArray) Sheet1.Range( "A1").Resize(1, list.Count).Value = list.ToArray
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |