Hello,
When you use the Find method it won't move the cursor, it will return a range object containing the value you were looking for. You should be able to use something like
Private Sub cmdSetRecord_Click()
Dim strName As String
Dim r, c As Integer
Dim rngFind As Range
Worksheets("GunNumbers").Select
strName = CStr(Me.txtGunNum.Text)
Set rngFind = Range("A2:A500").Find(what:=strName)
r = rngFind.Row
c = rngFind.Column
MsgBox ("Pause to check values")
End Sub
You may also want to include some error handling in case the number is not found:-
Private Sub cmdSetRecord_Click()
Dim strName As String
Dim r, c As Integer
Dim rngFind As Range
Worksheets("GunNumbers").Select
strName = CStr(Me.txtGunNum.Text)
Set rngFind = Range("A2:A500").Find(what:=strName)
If rngFind Is Nothing Then
MsgBox "Could not find that Gun Number", vbExclamation
Exit Sub
End If
r = rngFind.Row
c = rngFind.Column
MsgBox ("Pause to check values")
End Sub
HTH
Dan