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: 15
Default Change the range for a recordset?

I need to delete the rows with a positive number in a specific column. The
recordset will vary each time it is run. How do i change the range?



Sub click()
Dim i As Integer
Sheet1.Select
Sheet1.Range("a2:b6").Select
For i = 2 To 6
Cells(i, 2).Select
If Sheet1.Cells(i, 2) 0 Then Sheet1.Rows(i).Delete
Next i
End Sub
Exit Sub
 
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
How can change range to select active rows instead of :=Range("S10 ldiaz Excel Discussion (Misc queries) 7 August 29th 08 03:52 PM
How to populate Excel Range from Access RecordSet? deko[_2_] Excel Programming 6 February 27th 05 03:43 PM
Creating a recordset over a range James Excel Programming 3 December 10th 04 05:16 AM
Type recordset/recordset? FlaviusFlav[_9_] Excel Programming 4 May 24th 04 12:16 PM
open range (within workbook) as ado recordset - excel vba S. Daum Excel Programming 0 July 25th 03 04:45 PM


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