Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When resizing a range, excel doesn't seem to acknowledge the new size
In this example rect is increased by 1 row and 1 column. yet when the number of rows is asked for in the msgbox in replies with 8. It seems that it should recognize the new size. How do you get it to acknowledge the new dimensions. Thanks Don Sub resize() Worksheets("Sheet3").Activate Set rect = Range("a1:c8") numRows = rect.Rows.Count numColumns = rect.Columns.Count rect.resize(numRows + 1, numColumns + 1).Select MsgBox rect.Rows.Count End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Don,
Change: rect.resize(numRows + 1, numColumns + 1).Select to Set rect.resize(numRows + 1, numColumns + 1) --- Regards, Norman "don" wrote in message ... When resizing a range, excel doesn't seem to acknowledge the new size In this example rect is increased by 1 row and 1 column. yet when the number of rows is asked for in the msgbox in replies with 8. It seems that it should recognize the new size. How do you get it to acknowledge the new dimensions. Thanks Don Sub resize() Worksheets("Sheet3").Activate Set rect = Range("a1:c8") numRows = rect.Rows.Count numColumns = rect.Columns.Count rect.resize(numRows + 1, numColumns + 1).Select MsgBox rect.Rows.Count End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Don,
Set rect.resize(numRows + 1, numColumns + 1) Should read: Set rect.resize(numRows + 1, numColumns + 1) --- Regards, Norman |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Don.
That was imtended as: Set rect = rect.resize(numRows + 1, numColumns + 1) -- --- Regards, Norman |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
resizing a range of cells | Excel Discussion (Misc queries) | |||
Resizing a range of cells in a column | Excel Discussion (Misc queries) | |||
Resizing my range - End row | Excel Programming | |||
resizing a range | Excel Programming | |||
Resizing a Range | Excel Programming |