(Solved) – Application Match Error 13 I dont understand

(solved)-–-application-match-error-13-i-dont-understand

I’m trying to find a solution of

application.match error code 13

this is just a simple code in vba, is someone who can can help me fixing this code

Private Sub cmbName_Change()

If Me.cmbName.Value <> "" Then
    Dim sh As Worksheet
    Set sh = ThisWorkbook.Sheets("DATABASE")
    Dim i As Integer


    i = Application.Match(VBA.CLng(Me.cmbName.Value), sh.Range("A:A"), 0)

    Me.txtDatepicker.Value = sh.Range("A" & y).Value
    Me.cmbAddress.Value = sh.Range("C" & i).Value
    Me.txtContact.Value = sh.Range("D" & j).Value
    Me.cmbEducation.Value = sh.Range("E" & i).Value
    Me.cmbSpecify.Value = sh.Range("F" & i).Value
    Me.txtAge.Value = sh.Range("G" & j).Value

    If sh.Range("H" & i).Value = "Male" Then Me.optMale.Value = True
    If sh.Range("H" & i).Value = "Female" Then Me.optFemale.Value = True

    Me.cmbTraining.Value = sh.Range("I" & i).Value
    Me.cmbEmployment.Value = sh.Range("J" & i).Value
    Me.txtOthers.Value = sh.Range("K" & i).Value
    Me.txtAction.Value = sh.Range("L" & i).Value
    Me.txtLivelihood.Value = sh.Range("M" & i).Value

End If

End Sub

Leave a Reply

Your email address will not be published. Required fields are marked *