M
Mcasteel
The Debugger continues to highlight this line of code (one line in cod
window)
iRow = WorksheetFunction.Match(CustSSN
Worksheets("sheet1").Range("f27:f307"), 0)
The rest of the code is as follows, I even created a new workbook, t
simplify the match function with a test group of data. Im not sur
whrere to go from here.
_*This_is_the_entire_code_for_the_simplified_form.*_
Option Explicit
Private Sub cmdExit_Click()
End
End Sub
Private Sub cmdSelectRecord_Click()
Dim LName As String
Dim FName As String
Dim MName As String
Dim iRow As Long
Dim CustSSN As String
Dim rngActive As Range
Set rngActive = Application.ActiveCell
'Fill variable with User Inputed Cust. SSN
CustSSN = txtCustSSN
iRow = WorksheetFunction.Match(CustSSN
Worksheets("sheet1").Range("f27:f307"), 0)
If iRow = 0 Then
MsgBox "Customer SSN Was Not Found"
Else
MsgBox "Record Found."
'Move Customer info from Worksheet to current form
'lblLName.caption = rngActive.offset(0, -3).value
'lblFName.caption = rngActive.offset(0, -2).Value
'lblMiddle.caption = rngActive.offset(0, -1).value
End If
End Su
window)
iRow = WorksheetFunction.Match(CustSSN
Worksheets("sheet1").Range("f27:f307"), 0)
The rest of the code is as follows, I even created a new workbook, t
simplify the match function with a test group of data. Im not sur
whrere to go from here.
_*This_is_the_entire_code_for_the_simplified_form.*_
Option Explicit
Private Sub cmdExit_Click()
End
End Sub
Private Sub cmdSelectRecord_Click()
Dim LName As String
Dim FName As String
Dim MName As String
Dim iRow As Long
Dim CustSSN As String
Dim rngActive As Range
Set rngActive = Application.ActiveCell
'Fill variable with User Inputed Cust. SSN
CustSSN = txtCustSSN
iRow = WorksheetFunction.Match(CustSSN
Worksheets("sheet1").Range("f27:f307"), 0)
If iRow = 0 Then
MsgBox "Customer SSN Was Not Found"
Else
MsgBox "Record Found."
'Move Customer info from Worksheet to current form
'lblLName.caption = rngActive.offset(0, -3).value
'lblFName.caption = rngActive.offset(0, -2).Value
'lblMiddle.caption = rngActive.offset(0, -1).value
End If
End Su