+ Reply to Thread
Results 1 to 3 of 3

Lookup Values from TextBoxes

  1. #1
    Registered User
    Join Date
    01-21-2019
    Location
    Australia
    MS-Off Ver
    Office 2018
    Posts
    34

    Lookup Values from TextBoxes

    Hi Everyone,

    I have created a userform which limits the users choices for a ComboBox based on values they enter in multiple text boxes. The issue I am facing is that for example, that one of the textboxes has the user input the length of a product. If the limit for the option is for example 3000 (.Range("E" & A + 3).Value), if the user inputs 2800 (TextBox1.Text), then the code runs fine. However if the user inputs 500, it does not function. I believe this is caused by the fact that 5>3, as it only checks the first digit in the number. Is the anyway to stop this from happening. I have attached the code in question below. I have attempted simply changing the TextBox1.Text to .Value, however this seemed to cause more issues.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    3,775

    Arrow

    Hi !

    Use Val VBA function to convert a text to a number

  3. #3
    Registered User
    Join Date
    01-21-2019
    Location
    Australia
    MS-Off Ver
    Office 2018
    Posts
    34

    Re: Lookup Values from TextBoxes

    Wow can't believe it was that simple! Than you very much! Everything seems to work now!

+ 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