steveh8204
Board Regular
- Joined
- Aug 20, 2018
- Messages
- 151
A few times I've had this error when it always seems the case that I have a For statement. To make sure I'm not missing something I've stripped the code down to the bare bones but still getting it with the following code:
How is there a no For statement error?
I'm relatively new to VBA and while I've had plenty of joy learning, struggling with the basics like this can be disheartening.
Is there something obvious I'm regularly likely to be missing that is causing this error.
If I put an Endif in before the Next it gets worse, I get a Runtime 438 error "Object doesnt support this property or method".
Code:
Sub mysearch()
Dim v As String, i As Integer
For i = 1 To 10
v = Cells(i, 1)
If v = "Steve" Then
Cells(i, 1).Font = Bold
Next i
End Sub
How is there a no For statement error?
I'm relatively new to VBA and while I've had plenty of joy learning, struggling with the basics like this can be disheartening.
Is there something obvious I'm regularly likely to be missing that is causing this error.
If I put an Endif in before the Next it gets worse, I get a Runtime 438 error "Object doesnt support this property or method".
Last edited: