was ok - suddenly get error 91

AlexanderBB

Well-known Member
Joined
Jul 1, 2009
Messages
1,705
Code:
Dim RowNumber as long
 RowNumber= Columns("B").find(what:=cboJump,,xlValues,, xlRows,,,False).Row

The code is in Worksheet cboJump_KeyDown event.
I'm sure this worked yesterday

I also tried Dim Rownumber as Range and "Set RowNumber = ..." but same error.
 

Some videos you may like

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

dmt32

Well-known Member
Joined
Jul 3, 2012
Messages
6,086
Office Version
  1. 2019
Platform
  1. Windows
Hi,
assuming rest of you code all ok then error suggests value in cboJump cannot be found.

try updating your code to manage.

Code:
    Dim RowNumber As Range
    Set RowNumber = Columns("B").Find(cbojump, xlValues, , xlRows, , , False)
    
    If Not RowNumber Is Nothing Then
    'record found
    MsgBox RowNumber.Row
    Else
        MsgBox cbojump.Text & Chr(10) & "Record Not Found", 48, "Not Found"
    End If

Dave
 
Last edited:

Watch MrExcel Video

Forum statistics

Threads
1,108,956
Messages
5,525,883
Members
409,669
Latest member
JDCupps

This Week's Hot Topics

Top