+ 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
    35

    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
    9,831

    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
    35

    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)

Similar Threads

  1. Want Average on userform textboxes to ignore blank textboxes
    By cvanderweide92177 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-10-2018, 12:47 PM
  2. Replies: 0
    Last Post: 02-04-2015, 03:46 PM
  3. Replies: 3
    Last Post: 11-05-2014, 01:11 PM
  4. Adding TextBoxes Values Together using VBA
    By sunswan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-02-2013, 09:21 PM
  5. [SOLVED] Several Textboxes values into one textbox
    By sagar007 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-17-2012, 08:11 AM
  6. lookup row, populate userform textboxes, amend and save changes to original row
    By rich23l in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-14-2012, 07:03 AM
  7. [SOLVED] AVERAGE VALUES IN TEXTBOXES!!!!!
    By michael sofianos in forum Excel General
    Replies: 1
    Last Post: 02-21-2005, 07:06 PM

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