LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default tip: extending a range

Many people just use rows(n).Insert to extend a range
supposing you want ot extend teh range without the insert?
Here's one way :

Option Explicit
Sub test()
addRows Worksheets("sheet1").Range("myrange"), 2
End Sub
Sub addRows(target As Range, howmany As Long)
With target
With .Resize(.Rows.Count + howmany)
.Name = target.Name.Name
End With
End With
End Sub


you may want to add colr, borders etc...
I hope this may help somebody - and it may give you ideas.

Patrick


 
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
Extending a range selection Mats Samson Excel Programming 14 April 21st 08 10:47 PM
Extending a range Macca1984 Excel Discussion (Misc queries) 5 March 6th 08 11:36 AM
Extending a range Macca1984 Excel Programming 0 March 5th 08 09:58 PM
Automatically extending a range Oldjay Excel Programming 1 April 30th 07 03:04 AM
help extending formula to range pgd Excel Programming 4 October 16th 05 10:36 PM


All times are GMT +1. The time now is 04:03 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"