S
Syed Haider Ali
Hi Friends,
__1._ I use the following codes for vlookup
private sub combobox1_change()
TextBox1 = Application.WorksheetFunction.VLookup(CLng(ComboBox1),
Sheet6.Range("a2:b65536"), 2)
it is working properly, But when we reached blank record by scrolling
through comboBox the run time error 13 saying type mismatch appears.
How can we overcome this problem?
_2._The same thing with match Command
Privat sub textbox1_afterupdate()
dim res as variant
res = Application.WorksheetFunction.Match(TextBox2,
Sheet6.Range("b2:b65536"), 0)
Textbox3 = Sheet6.Range("b1").Offset(res, -1).Value
it is also working properly, But when the record does not match then
run time error 1004 appears. I would like to display a message "Record
not Found" at this moment.
Thanks
Syed Haider Ali
__1._ I use the following codes for vlookup
private sub combobox1_change()
TextBox1 = Application.WorksheetFunction.VLookup(CLng(ComboBox1),
Sheet6.Range("a2:b65536"), 2)
it is working properly, But when we reached blank record by scrolling
through comboBox the run time error 13 saying type mismatch appears.
How can we overcome this problem?
_2._The same thing with match Command
Privat sub textbox1_afterupdate()
dim res as variant
res = Application.WorksheetFunction.Match(TextBox2,
Sheet6.Range("b2:b65536"), 0)
Textbox3 = Sheet6.Range("b1").Offset(res, -1).Value
it is also working properly, But when the record does not match then
run time error 1004 appears. I would like to display a message "Record
not Found" at this moment.
Thanks
Syed Haider Ali