Collections cannot be sorted so if you need to sort data you will probably want to use an array. Here is a link Moving everything over to VBA from palmcolors.com is not.
Basically what I want to do is define a list in my VBA code which I will then use in a loop to copy and paste columns which headings match my.
To simulate a List, I decided to use the standard VBA Array and the data type variant so it will be possible to add any data type to the Array.
Create a List Box on the Worksheet. In an Excel worksheet, you can create lists by using the List Box control. In this example, the worksheet has.
To create a list box in Excel VBA, execute the following steps. Note: use Sheet2 if your list box is located on the second worksheet, Sheet3 if your list box is.
Arrays are a variant type variable that you can use in VBA coding to store a list of data. Think of it as a mini-spreadsheet inside of a single.