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: 2
Default Modify Macro to Include Inserted Rows

I recorded a macro to sort rows:

Sub test2()
'
' test2 Macro
'
'
Rows("2:5").Select
Selection.Sort Key1:=Range("A2"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End Sub

If I insert rows between 2 and 5 the macro does not change to include
the new rows. How do I change it so it is not a fixed selection?

Chris.....
 
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
modify macro to include more tabs teh_chucksta Excel Discussion (Misc queries) 1 March 11th 10 09:00 PM
Macro to Number New Rows Inserted Into Table? Lysander Stark Excel Discussion (Misc queries) 2 August 28th 06 04:49 PM
Can inserted rows automatically include existing worksheet formula tgdavis Excel Discussion (Misc queries) 2 September 20th 05 09:08 PM
Modify A Formula To Include AND carl Excel Worksheet Functions 2 August 21st 05 03:41 PM


All times are GMT +1. The time now is 04:19 PM.

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

About Us

"It's about Microsoft Excel"