Userforms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello! I am new to this newsgroup so, I hope I do this right. O.k, my
question is:
I have a userform in Excel, and the textbox, once a value is entered, goes
to a cell in the sheet, and in the sheet, there are vlookup functions to
lookup the value of that same cell. textbox is going to cell B1, and B1 is a
lookup value for other functions in the sheet. This is what happens: once I
use my userform and enter a value in B1, the vlookups come back as "#N/A",
but if I enter a value without using the userform, the vlookups work. B1 is
formatted to a general number, if that helps. Help!?
 
the value in B1 is probably being stored as text rather than as a number.
You can check by going to another cell and doing

=istext(B1)

You can control this by using an event to write the value to the cell

Worksheets("Sheet1").Range("B1").Value = cdbl(Textbox1.Text)


Which event would depend on where the control is located.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top