Hi,
i'm having a huge problem, and I have a deadline to meet in a few hours, any help would be very appreciated. here's my problem (which i've simplified down to the bare bones): I have a textbox. everytime i type a character in the textbox, i would like it to see if the textbox's value is now equal to the value of the cell that's selected on the spreadsheet. If the value of the textbox is indeed equal to the value of the selected cell, then add a new line to the listbox.
the problem comes in that, for some reason, the textbox value and the cell value don't think they are equal to each other when they really are. for example If i type in 2202 in the textbox, and the cell that's selected says 2202, nothing happens.
here's my code:
Private Sub TextBox1_Change()
If Selection.Value = TextBox1.Value Then
ListBox1.AddItem Selection.Offset(0, -7).Value
End if
I'm typing nothing but numbers into the textbox, and once I get this straight I need to do variations like:
If Selection.Offset(0, 2).Value > TextBox1.Value Then
If Selection.Offset(0, 2).Value < TextBox1.Value Then
and changing the line to "If Selection.Offset(0, 2).Value = TextBox1.Value Then" doesn't work because that was giving incorrect results...
PLEASE HELP ME, I DON'T WANT TO GET FIRED.
Bookmarks