Good morning,
For Project Name and No Contract I want it autofill based on NIP that I have choose. This is my code and its not working
Private Sub CmbNIP_Change()
Dim i As Long, LastRow As Long, ws As Worksheet
Set ws = Sheets("List Proyek")
LastRow = ws.Range("A" & Rows.Count).End(xlUp).Row
For i = 2 To LastRow
If Val(Me.CmbNIP.Value) = ws.Cells(i, "A") Then
MsgBox Me.CmbNIP.Value
Me.txtPROJECTNAME = ws.Cells(i, "B").Value
Me.txtNOCONTRACT = ws.Cells(i, "C").Value
End If
Next i
End Sub
This is the data on sheet List Proyek
Thank you for your help
For Project Name and No Contract I want it autofill based on NIP that I have choose. This is my code and its not working
Private Sub CmbNIP_Change()
Dim i As Long, LastRow As Long, ws As Worksheet
Set ws = Sheets("List Proyek")
LastRow = ws.Range("A" & Rows.Count).End(xlUp).Row
For i = 2 To LastRow
If Val(Me.CmbNIP.Value) = ws.Cells(i, "A") Then
MsgBox Me.CmbNIP.Value
Me.txtPROJECTNAME = ws.Cells(i, "B").Value
Me.txtNOCONTRACT = ws.Cells(i, "C").Value
End If
Next i
End Sub
This is the data on sheet List Proyek
Thank you for your help