resizing a range
I am filling an array (UO) with unique values and then filling a target range
(UniqueOrders) with the values from the array.
The range is used as a 'rowsource' for a listbox and I am trying to resize
the range to eliminate empty cells.
The 'filling' part works fine, but after running the following code:
Workbooks("Orders.xls").Worksheets("Shipped").Rang e("UniqueOrders").Resize(Index01 - 1, 1).Value = .Transpose(UO)
I manually go to the worksheet where the the range is and find that the
range (UniqueOrders) still has the original number of rows(516) instead of
"Index01 - 1" (151) rows.
What do I need to do to get the range to be resized as desired?
TIA
|