+ Reply to Thread
Results 1 to 3 of 3

Select item in listbox via macro

  1. #1
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,163

    Select item in listbox via macro

    How do I select the first item in a listbox via code (userform).
    Scenerio:
    A user starts with listbox3 and makes a selection for a font type.
    If the font selected doesnt exist on there system (code already taken care of, true or false) I want to automatically set the font to the first item in listbox3 as a default value transparently so the user can continue.
    Last edited by Rick_Stanich; 01-12-2010 at 04:19 PM.
    Regards

    Rick
    Win10, Office 365

  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: Select item in listbox via macro

    Hello Rick,

    This will select the top item in the ListBox1.
    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
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,163

    Re: Select item in listbox via macro

    As simple as your solution is, I cant find anything like that in the help file.
    Thanks.

+ 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