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: 44
Default finding row 7

Hello everybody,
I have this code, which works fine... but I need the application to start
looking for the first empty row starting from row 7... how can I do that?

Private Sub CommandButton1_Click()

Range("A7").Select

Do

If IsEmpty(ActiveCell) = False Then

ActiveCell.Offset(1, 0).Select

End If

Loop Until IsEmpty(ActiveCell) = True
Dim rng As Range
ActiveCell.EntireRow.FillDown
On Error Resume Next
Set rng = ActiveCell.EntireRow.SpecialCells(xlConstants)
On Error GoTo 0
If Not rng Is Nothing Then
rng.ClearContents
End If

Dim iRow As Long
Dim ws As Worksheet
Set ws = Worksheets("GiM")

iRow = ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row


 
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
Finding second value? bgkgmg Excel Worksheet Functions 6 August 24th 08 05:22 PM
Finding The MAX Value carl Excel Worksheet Functions 6 July 25th 07 09:36 PM
Finding Row fak119 Excel Discussion (Misc queries) 3 May 18th 06 05:54 PM
finding the "end" Julia New Users to Excel 2 September 1st 05 02:38 AM
Finding max value paradise Excel Programming 2 November 7th 03 01:42 AM


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