View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
gregork gregork is offline
external usenet poster
 
Posts: 102
Default Userfrm Lookup Works For text not Number

Hi,
I have the following code for inserting data on a user form based on a
number on a cell in a worksheet:


Private Sub ComboBox1_Click()
TextBox2.Text = WorksheetFunction.VLookup(ComboBox1.Text,
Worksheets("Blending Details").Range("A2:Z500"), 2, False)

End Sub

When I put a word in the combo box the lookup is successful and I get the
value returned in textbox2. But when a number is in the combox I get a
runtime error.
Any ideas?

Thanks
gregork