OK this is probably a dumb question. But I am still learning VBA arrays.
Suppose I have a 2D array and I want to do the VBA equivalent of taking an Excel range and Cut Column, Insert Column. (So say I had 4 columns in the array. I want to alter the array so that the 3rd & 2nd column switches places e.g. before = ABCD, after = ACBD).
Is this possible? (Short of building a copy of the array and looping through columns).
Additional Information:
- Please don't say "just cut & paste the columns in the original range before creating the array". That's not what the thread is asking!
- For forum users who like to know a practical use for thread before they offer a reply - I am using the array to build a listbox. I want the 2nd & 3rd columns switched in the listbox. I figured that it would be easier to do this in the array rather than populate the listbox and then try to switch columns. (Note I don't know how many columns will be in the array. But I do know that the 3rd & 2nd have to be switched).
Bookmarks