Results 1 to 2 of 2

Thread: Option Buttons - programmatic partial disabling

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 1999
    Location
    Houston, TX - USA
    Posts
    21

    Post

    If I have 10 option buttons in two containers at the same form (for example, 2 in frame1 and 8 in frame2.

    If the user chooses opt1 (in frame1) not all of the choices in frame 2 are valid. Suppose that only opt3, opt4 and opt5 are valid choices.

    I know how to change the properties programatically, yet I would like to use a For...Next statement to do it.

    Its a simple code, yet I am stuck in my attempts.

    Can anybody help, please???




    ------------------
    Paul Stermann
    DSI-Houston

  2. #2
    Member
    Join Date
    Jan 1999
    Location
    Gig Harbor, WA, USA
    Posts
    48

    Post

    You can't reference object names like strings (i.e. ("Opt" & i).Enabled = False). Instead, use a control array. Then just do:
    Code:
    For i = 0 to 5
    Opt(i).Enabled = False
    Next i
    Or however you wish to apply it.

    ------------------
    (¯`·.¸¸.·´¯`·->ShadowCrawler<-·´¯`·.¸¸.·´¯)
    Teenage Programmer
    Visual Basic, HTML, C++, JavaScript

    http://welcome.to/X12Tech
    Email: [email protected]
    ICQ#: 9872708

Posting Permissions

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



Click Here to Expand Forum to Full Width