+ Reply to Thread
Results 1 to 5 of 5

Testing for "text" in an input box

  1. #1
    Registered User
    Join Date
    06-14-2020
    Location
    Missouri, USA
    MS-Off Ver
    Office 365
    Posts
    48

    Testing for "text" in an input box

    Hi all,
    I have tried the following to test my input box to make sure it is text but it returns FALSE even when it is text.

    Please Login or Register  to view this content.
    Any thoughts as to why this returns FALSE even when the input box contains only text?

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,519

    Re: Testing for "text" in an input box

    The value from TextBox will be always "Text".

    What are you trying to do?

  3. #3
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,519

    Re: Testing for "text" in an input box

    https://docs.microsoft.com/en-us/off...ation.inputbox

    Use Type = 2 when you use Application.InputBox
    That way you don't need to check if it is text.

  4. #4
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,409

    Re: Testing for "text" in an input box

    If I understand your setup correctly, your code sets Text_Test equal to True (not False) every time which is what I would expect. Why don't you post a copy of your workbook that is always returning False (see the yellow banner near the top of this forum's window) so we can see exactly what you see instead of trying to duplicate it from you brief description.

  5. #5
    Registered User
    Join Date
    06-14-2020
    Location
    Missouri, USA
    MS-Off Ver
    Office 365
    Posts
    48

    Re: Testing for "text" in an input box

    Thank you guys for your input on this.
    I was so focused on trying to handle errors from incorrect inputs that I totally missed the fact that the value from a text box would already be ...well ... text!

+ 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. [SOLVED] Code Clean-Up: Delete "False" worksheet created when "Cancel" is chosen in Input Box
    By Kenny Blackwell in forum Excel Programming / VBA / Macros
    Replies: 25
    Last Post: 08-31-2015, 10:00 AM
  2. Requiring input by user to be either "Economy", "Business" or "Club"
    By cmurda in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-08-2014, 08:57 PM
  3. Replies: 1
    Last Post: 08-15-2014, 06:00 AM
  4. [SOLVED] Cell Color with"if" statement testing for a "text" value
    By ARocketScientist in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-08-2014, 09:01 PM
  5. Conditional formatting by testing for "True" or "False"
    By Excel_vba in forum Excel General
    Replies: 2
    Last Post: 02-21-2014, 11:26 PM
  6. input type "hidden" onclick "document.text.submit ...for web login and parsing
    By hgtenn in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-21-2014, 08:40 PM
  7. How can i copy value from "HTMLText"(EMBED("Forms.HTML:Text","")),using Macro
    By andrewyang in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-18-2010, 12:47 AM

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