+ Reply to Thread
Results 1 to 3 of 3

Making an option button default

Hybrid View

peedarp1985 Making an option button... 05-12-2010, 05:35 PM
Leith Ross Re: Making an option button... 05-12-2010, 05:57 PM
peedarp1985 Re: Making an option button... 05-13-2010, 02:31 AM
  1. #1
    Registered User
    Join Date
    05-11-2010
    Location
    Portland oregon
    MS-Off Ver
    Excel 2007
    Posts
    10

    Making an option button default

    I have a user form in which I am using a couple of option buttons. I am trying to make one of the the buttons as a default if none is selected. How can I go about doing it? Can anybody help me with the code?
    Last edited by peedarp1985; 05-13-2010 at 02:32 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,259

    Re: Making an option button default

    Hello peedarp1985,

    Say you have three option buttons named "OptionButton1", "OptionButton2", and "OptionButton3". When the User Form is displayed none will be selected. If you want "OptionButton1" to be set by default then...
    Private Sub UserForm_Activate()
    
        OptionButton1.Value = True
    
    End Sub
    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
    05-11-2010
    Location
    Portland oregon
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Making an option button default

    Thank you very much that worked.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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