KnoxBear832
New Member
- Joined
- Aug 25, 2014
- Messages
- 4
Using FIND in my code and getting a run-time error even with a ON ERROR GOTO line preceding the FIND line.
I'm trying to increase the row height of the cell that contains a particular text value. The sheet may or may not have that text and it's not always in the same cell, so I thought the ON ERROR / FIND combination would be best. I am using it multiple times in the macro and it seems to be working find, except for this last instance. What am I doing wrong??
Here is the code:
I just tried this bit by itself and it seems to work fine. There must be something before this that interferes. Any ideas on what I may need to clear?
I'm trying to increase the row height of the cell that contains a particular text value. The sheet may or may not have that text and it's not always in the same cell, so I thought the ON ERROR / FIND combination would be best. I am using it multiple times in the macro and it seems to be working find, except for this last instance. What am I doing wrong??
Here is the code:
Code:
On Error GoTo Laststep Cells.Find(What:="Sample Text", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.RowHeight = 12.75
Laststep:
Range("A2").Select
End Sub
I just tried this bit by itself and it seems to work fine. There must be something before this that interferes. Any ideas on what I may need to clear?
Last edited: