KeyPad Error (2 Viewers)

PNGBill

Win10 Office Pro 2016
Local time
Tomorrow, 04:52
Joined
Jul 15, 2008
Messages
2,271
Hi Forum,
Learning Excel VBA and I could not get code to run.
Copied code from file and it worked.
Trial and error proved the problem was my keyboard typing number one "1"
was not accepted.
The copied code 1 and my 1 look exactly the same but must be different behind the scene :eek:

Anyone experienced this and if so, have a solution ?

The error is in LookAt:=x1Whole where my keyboard 1 is not accepted.
 
Last edited:

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 23:52
Joined
May 7, 2009
Messages
19,175
maybe format the cell as General format.
 

PNGBill

Win10 Office Pro 2016
Local time
Tomorrow, 04:52
Joined
Jul 15, 2008
Messages
2,271
Just realised the code is xl (XL) not x1
:banghead:
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 23:52
Joined
May 7, 2009
Messages
19,175
test:
put 1 in any row of column A in sheet1
Code:
Private Sub x()
    Dim rng As Range
    Set rng = Sheet1.Cells.Find("1")
    If Not rng Is Nothing Then
        Debug.Print rng.Address
    End If
End Sub
 

Users who are viewing this thread

Top Bottom