I have a table of data where the user will select data at the body of it ... .
then a UI will showup and will include the selected columns headers and allows user to swap headers sequence order then proceed to paste into new sheet with the new order
I need a way I can compare my listbox items user defined arrangement with the array that doesnt include the headers ...
So it paste the array columns in the same way as user defined columns
Redim to add headers wont work because it only works with the last dimension
then a UI will showup and will include the selected columns headers and allows user to swap headers sequence order then proceed to paste into new sheet with the new order
Code:
For Each rng In Application.Selection.Columns
ListBox2.AddItem UCase(TableHeader(rng)) ' This adds the headers to a listbox2 in the UF
Next
arr1 = Application.Selection.Value ' this will copy the selection to Variant 2D ARRAY [B]BUT DOESNT INCLUDE HEADERS[/B]
I need a way I can compare my listbox items user defined arrangement with the array that doesnt include the headers ...
So it paste the array columns in the same way as user defined columns
Redim to add headers wont work because it only works with the last dimension
Last edited: