Prima Satria
New Member
Hello,
I want to extract the last driving kilometer of a vehicle ID, let's say 27001 thru a ComboBox1.
The database is store in sheets "Data", and the number of vehicle ID is in column F while the driving kilometer is in column O.
So, when I change the vehicle ID in ComboBox1 then it will lookup the last driving kilometer in TextBox8.
Below the code I have which not work.
Please click DATA INPUT button in sheet "DATA"
Thanks in advance.
I want to extract the last driving kilometer of a vehicle ID, let's say 27001 thru a ComboBox1.
The database is store in sheets "Data", and the number of vehicle ID is in column F while the driving kilometer is in column O.
So, when I change the vehicle ID in ComboBox1 then it will lookup the last driving kilometer in TextBox8.
Below the code I have which not work.
Code:
Private Sub ComboBox1_Change()
'TextBox8.Value = Application.Lookup(2, 1 / Worksheets("Data").Range("R4C7:R23C7") = Me.ComboBox1.Value, Worksheets("Data").Range("R4C5:R23C5"))
End Sub
Please click DATA INPUT button in sheet "DATA"
Thanks in advance.