Nurul Ahda
New Member
- Joined
- Dec 15, 2022
- Messages
- 1
- Office Version
- 2016
- Platform
- Windows
I wanna do an automated leave tracker. i want the staff name to appear based on their id using vlookup.
Can someone help where is the mistake?
Private Sub ComboBox1_Change()
If Me.ComboBox1.Value <> "" Then
Me.TextBox1.Value = Application.WorksheetFunction.VLookup(CLng(Me.ComboBox1.Value), ThisWorkbook.Sheets("Monthly Summary").Range("A:B"), 2, 0)
Else
Me.TextBox1.Value = ""
End If
End Sub
Can someone help where is the mistake?
Private Sub ComboBox1_Change()
If Me.ComboBox1.Value <> "" Then
Me.TextBox1.Value = Application.WorksheetFunction.VLookup(CLng(Me.ComboBox1.Value), ThisWorkbook.Sheets("Monthly Summary").Range("A:B"), 2, 0)
Else
Me.TextBox1.Value = ""
End If
End Sub