R
robin.coe
I'm trying to write a piece of VBA that will search a worksheet for 5
consecutive blank rows in order to paste data there. While I've
written code that does this, however, while the code is searching for
the 5 consecutive blank rows it is changing the value in some cells to
the number 1 and I can't figure out why. Here's the portion of the
code that's doing this - it happens on the
ActiveCell=Application.WorksheetFunction.Find("", a8:a75") line. Any
help is appreciated.
Worksheets("Fees").Range("a8").Activate
Do
ActiveCell = Application.WorksheetFunction.Find("",
"a8:a75")
addrStartingCell = ActiveCell.Address
Worksheets("Fees").Range(addrStartingCell).Activate
For i = 0 To 5
ActiveCell.Offset(1, 0).Activate
If ActiveCell.Value = "" Then
bolEmpty(i) = True
Else
bolEmpty(i) = False
End If
Next
consecutive blank rows in order to paste data there. While I've
written code that does this, however, while the code is searching for
the 5 consecutive blank rows it is changing the value in some cells to
the number 1 and I can't figure out why. Here's the portion of the
code that's doing this - it happens on the
ActiveCell=Application.WorksheetFunction.Find("", a8:a75") line. Any
help is appreciated.
Worksheets("Fees").Range("a8").Activate
Do
ActiveCell = Application.WorksheetFunction.Find("",
"a8:a75")
addrStartingCell = ActiveCell.Address
Worksheets("Fees").Range(addrStartingCell).Activate
For i = 0 To 5
ActiveCell.Offset(1, 0).Activate
If ActiveCell.Value = "" Then
bolEmpty(i) = True
Else
bolEmpty(i) = False
End If
Next