i cannot return value in textbox using combobox

  • i cannot auto populate my textboxes when i select a value on the combobox.
    can you help me about this?
    what is wrong in my coding?


    thank you very much
    much appreciated


    my file is attached



    thank you very much



    Private Sub cmbiqama_Change()


    Dim IQAMANo As Double


    If Me.cmbiqama.Value = "" Then

    MsgBox "IQAMA No Can Not be Blank!!!", vbExclamation, "IQAMA No"


    Exit Sub


    End If


    IQAMANo = cmbiqama.Value


    On Error Resume Next
    With Me


    Me.Textempnum.Value = Application.WorksheetFunction.VLookup(IQAMANo, Sheets("Sheet3").Range("B2:N1087"), 0, 2)
    Me.txtemployeename.Value = Application.WorksheetFunction.VLookup(IQAMANo, Sheets("Sheet3").Range("B2:N1087"), 0, 4)
    Me.ComboBox1.Value = Application.WorksheetFunction.VLookup(IQAMANo, Sheets("Sheet3").Range("B2:N1087"), 0, 5)
    Me.cmbxcountry.Value = Application.WorksheetFunction.VLookup(IQAMANo, Sheet3.Range("B2:N1087"), 6, 0)
    Me.textBASICSALARY.Value = Application.WorksheetFunction.VLookup(IQAMANo, Sheets("Sheet3").Range("B2:N1087"), 7, 0)
    Me.textOVERTIME.Value = Application.WorksheetFunction.VLookup(IQAMANo, Sheets("Sheet3").Range("B2:N1087"), 8, 0)
    Me.textFOOD.Value = Application.WorksheetFunction.VLookup(IQAMANo, Sheets("Sheet3").Range("B2:N1087"), 9, 0)
    Me.textTRANS.Value = Application.WorksheetFunction.VLookup(IQAMANo, Sheets("Sheet3").Range("B2:N1087"), 10, 0)
    Me.textOTHERS.Value = Application.WorksheetFunction.VLookup(IQAMANo, Sheets("Sheet3").Range("B2:N1087"), 11, 0)
    Me.txtab.Value = Application.WorksheetFunction.VLookup(IQAMANo, Sheets("Sheet3").Range("B2:N1087"), 13, 0)
    Me.txtlate.Value = Application.WorksheetFunction.VLookup(IQAMANo, Sheets("Sheet3").Range("B2:N1087"), 14, 0)
    Me.txtloan.Value = Application.WorksheetFunction.VLookup(IQAMANo, Sheets("Sheet3").Range("B2:N1087"), 15, 0)
    Me.txtpenalty.Value = Application.WorksheetFunction.VLookup(IQAMANo, Sheets("Sheet3").Range("B2:N1087"), 16, 0)
    Me.lbldeduc.Caption = Application.WorksheetFunction.VLookup(IQAMANo, Sheets("Sheet3").Range("B2:N1087"), 17, 0)
    Me.lblGROSSPAY.Caption = Application.WorksheetFunction.VLookup(IQAMANo, Sheets("Sheet3").Range("B2:N1087"), 19, 0)
    Me.lblnetpay.Caption = Application.WorksheetFunction.VLookup(IQAMANo, Sheets("Sheet3").Range("B2:N1087"), 20, 0)
    Me.lblpayd.Caption = Application.WorksheetFunction.VLookup(IQAMANo, Sheets("Sheet3").Range("B2:N1087"), 22, 0)
    Me.txtemployer.Value = Application.WorksheetFunction.VLookup(IQAMANo, Sheets("Sheet3").Range("B2:N1087"), 23, 0)
    Me.ComboBox2.Value = Application.WorksheetFunction.VLookup(IQAMANo, Sheets("Sheet3").Range("B2:N1087"), 24, 0)


    End With

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!