Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
RHC RHC is offline
external usenet poster
 
Posts: 2
Default problem resizing range in vba

Access 2000 to Excel 2000

I have a worksheet with a cell wide range called adjustments (A1) above
another
range named GL Balance at (A4). I want to use xlRng.CopyFromRecordset to
update the adjustment range. The number of rows in the recordset can vary so
I need to resize the range so that it inserts additional rows between itself
and the GLBalance range. I have tried xlRng.resize(i) where i is the number
of rows and this overwrites whats in the cells below it. And I have tried
xlRng.rows(i).insert xlShiftDown and this doesnt seems to insert but just
fill cells until its hits the next range (GLBalance) and then stops. So how
do I increase the size of a range by shifting everything below it down?
thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default problem resizing range in vba

Rows are inserted above a specified range when you shift down, so...
Rows(4).Resize(i).Insert Shift:=xlDown
- or -
Range("GLBalance").EntireRow.Resize(i).Insert Shift:=xlDown
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"RHC"
wrote in message
Access 2000 to Excel 2000
I have a worksheet with a cell wide range called adjustments (A1) above
another
range named GL Balance at (A4). I want to use xlRng.CopyFromRecordset to
update the adjustment range. The number of rows in the recordset can vary so
I need to resize the range so that it inserts additional rows between itself
and the GLBalance range. I have tried xlRng.resize(i) where i is the number
of rows and this overwrites whats in the cells below it. And I have tried
xlRng.rows(i).insert xlShiftDown and this doesnt seems to insert but just
fill cells until its hits the next range (GLBalance) and then stops. So how
do I increase the size of a range by shifting everything below it down?
thanks in advance.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
resizing a range don Excel Programming 3 February 19th 06 12:23 PM
resizing a range don Excel Programming 3 February 18th 06 03:00 AM
Resizing my range - End row Jacqui Excel Programming 3 November 1st 05 06:00 PM
resizing a range Tim Kredlo Excel Programming 1 September 27th 05 08:30 PM
Resizing a Range NetWave128[_3_] Excel Programming 3 April 24th 04 11:16 AM


All times are GMT +1. The time now is 05:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"