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: 8
Default Range in Macro to change after rows inserted

Hi
I use the following macro (copied from this group)
When I insert rows above the range, I need the range to adjust accordingly.
I have tried adapting similar answers found here by naming the range but
cannot get it to work.
Any help would be appreciated.


Private Sub CommandButton15_Click()
Dim C As Range
With ActiveSheet.Range("j69:j127")
Do
Set C = .Find("", LookIn:=xlValues, LookAt:=xlWhole, _
MatchCase:=False)
If C Is Nothing Then Exit Do
C.EntireRow.Hidden = True
Loop
End With
End Sub

Thanks
Malcolm
 
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
Insert Row based on count and copy range to inserted rows JBG Excel Programming 2 July 28th 09 08:37 PM
How can change range to select active rows instead of :=Range("S10 ldiaz Excel Discussion (Misc queries) 7 August 29th 08 03:52 PM
Modify Macro to Include Inserted Rows Icefog Excel Programming 3 August 28th 08 02:12 PM
Change colour of cells when content is altered/changed BUT NOT TO INSERTED OR DELETED ROWS Martin ©¿©¬ @nohere.net Excel Discussion (Misc queries) 3 April 12th 08 05:13 PM
Macro to Number New Rows Inserted Into Table? Lysander Stark Excel Discussion (Misc queries) 2 August 28th 06 04:49 PM


All times are GMT +1. The time now is 08:19 AM.

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"