Results 1 to 4 of 4
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    how to set default option button using index num

    Within a frame I have many option buttons.
    Does Word store option buttons with a next sequential value.
    for example command buttons have next sequential number as per their order
    -1
    0
    1
    2

    Given an index number I would like to use that to set option button as default button.
    eg
    passed index = 3

    therefore
    frameName = optionbutton(3) = default

    Any ideas?
    Thanks in advance!
    Diana

  2. #2
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: how to set default option button using index num

    Diana,

    Each option button has a name. Go into design mode (the set square icon on the control toolbar) and right click on the option button; select "properties" to see the name
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  3. #3
    knoway
    Guest

    Re: how to set default option button using index num

    Hi Diana,

    You can set up a control array in VB that will do what you want. However, I know of no way to do the same thing in VBA under Word.

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: how to set default option button using index num

    In VBA, you fake an array by naming the controls consistently (i.e., Option1, Option2, Option3) and then loop through the controls collection testing for control names where the left however many characters of the name equals the fake array base name, in this case "Option". When you find one, you do whatever you want to do for each of that group of controls.
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •