View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default resizing a range

Workbooks("Orders.xls").Worksheets("Shipped").Rang e("UniqueOrders").Resize(I
ndex01 - 1, 1).Name = "UniqueOrders"

--
Regards,
Tom Ogilvy


"Tim Kredlo" wrote in message
...
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(I
ndex01 - 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