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 |
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 |
All times are GMT +1. The time now is 10:10 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com