WindsorKnot
Board Regular
- Joined
- Jan 4, 2009
- Messages
- 160
Hi,
I'm trying to do the equivalent of Row() in VBA, but am having some trouble.
My code is below and I keep gettin an error message 13, type mismatch. Any help would be appreciated.
I'm trying to do the equivalent of Row() in VBA, but am having some trouble.
My code is below and I keep gettin an error message 13, type mismatch. Any help would be appreciated.
Code:
Sub GetRowPosition()
Dim I As Integer
Dim J As Integer
For I = 1 To 100
If Cells(I, "B").Value = "Fill" Then
J = Application.Rows(I)
Exit For
J = J + 1
End If
Next I
MsgBox J
End Sub