A
antonov
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
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