+ Reply to Thread
Results 1 to 6 of 6

Returning "True" value from Javascript drop down box

  1. #1
    Registered User
    Join Date
    10-22-2014
    Location
    Cincinnati
    MS-Off Ver
    2013
    Posts
    12

    Returning "True" value from Javascript drop down box

    Hello All,

    I have asked this question on Mr. Excel. I was wondering if you could all try to help as well? Thank you!
    http://www.mrexcel.com/forum/excel-q...-down-box.html
    Last edited by Apollo4life; 10-23-2014 at 09:18 AM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    re: Returning "True" value from Javascript drop down box

    Hello Apollo4Life,

    Welcome to the Forum!

    Here is a VBA macro example that will display the selected value.

    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    10-22-2014
    Location
    Cincinnati
    MS-Off Ver
    2013
    Posts
    12

    re: Returning "True" value from Javascript drop down box

    I put in the code and have it where Textbox1 is on a userform. When I try this and have it to fire on a button click nothing happens.

    Please Login or Register  to view this content.
    Last edited by Apollo4life; 10-22-2014 at 02:10 PM.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    re: Returning "True" value from Javascript drop down box

    Hello Apollo4Life,

    To help you find a solution to this problem, you will neeed to post a copy of your workbook.

    If your workbook contains any sensitive information, please redact that information before you post.

    How To Post Your Workbook
    1. At the bottom right of the Reply window, Click the button Go Advanced
    2. At the top of the Your Message Window, in the first row of icons, Click the Paperclip icon.
    3. Click the Add Files button at the top right in the dialog box. This displays the File Manager dialog.
    4. Click the Select Files button at the bottom middle of the dialog.
    5. In the new window Find the file you want to upload, select it, and Click Open.
    6. You will now be back in the File Manager dialog. Click the bottom Middle button Upload File.
    7. Wait until the file has completely uploaded before you exit the File Manager dialog.

  5. #5
    Registered User
    Join Date
    10-22-2014
    Location
    Cincinnati
    MS-Off Ver
    2013
    Posts
    12

    re: Returning "True" value from Javascript drop down box

    It works great now!! I just had to (0) to the end of Sel = HTMLdoc.getElementByName("Car_Year") to make it Sel = HTMLdoc.getElementByName("Car_Year") (0) and this worked perfectly. Thank you for all your help!
    Last edited by Apollo4life; 10-23-2014 at 11:43 AM.

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    re: Returning "True" value from Javascript drop down box

    Hello Apollo4Life,

    Ah, I see what you wanted to do now. Each Option item is part of a collection. The first item starts at zero. By using the subscript, you can can access any item in the collection.

    The Selected attribute of an Option item is used to display that item in the Select drop down.

    Glad that you have it working the way you want.

+ 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. Vlookup only returning values when true ?!?
    By mx5jmcb in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-21-2013, 05:42 PM
  2. Excel 2007 : Index, Match, True returning #NA??
    By Martin Chamberlin in forum Excel General
    Replies: 1
    Last Post: 10-08-2011, 02:20 PM
  3. Returning True/False/Maybe
    By RivFin in forum Excel General
    Replies: 1
    Last Post: 02-03-2011, 06:29 PM
  4. Formula for returning True (1) or False(0)
    By wish2excel in forum Excel General
    Replies: 5
    Last Post: 10-11-2010, 04:14 AM
  5. Returning a Value if 3 Conditions are True
    By brownie224 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-11-2006, 07:00 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