+ Reply to Thread
Results 1 to 2 of 2

Textbox.value and cell value ...are they the same?

  1. #1
    Registered User
    Join Date
    01-09-2004
    Location
    Chicago
    Posts
    31

    Question Textbox.value and cell value ...are they the same?

    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.
    Last edited by abxy; 03-14-2005 at 12:09 PM.

  2. #2
    Registered User
    Join Date
    01-09-2004
    Location
    Chicago
    Posts
    31
    *bump*

    sorry mates, really need help on this one so that I don't end up fired.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1