Results 1 to 6 of 6

Thread: Option button click event

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2000
    Location
    Fresno, California, USA
    Posts
    195
    How can I programatically change the value of an option button without firing the click event for that button?

  2. #2
    Addicted Member
    Join Date
    Jan 2000
    Location
    Oshkosh, WI
    Posts
    163

    Smile

    One way to do it is to declare a flag that you set before you "click the button in code". Then in the click_event of the button, check for the flag and don't do anything if it's set. Reset the flag after the end of the click event.

    This is not the most elegant solution, but it works.

    Glenn D
    Development/Analyst

  3. #3
    Junior Member
    Join Date
    Jul 2000
    Location
    Posts
    28

    Wink Use a public variable...

    Use a public variable to indicate that YOU are changing the value. ("Public gbImChanging as Boolean" - in a .bas module.), and in the click event, make the first lines something like :

    'who is changing the value?
    If gbImChanging Then
    gbImChanging = False
    Exit Sub
    Else
    gbImChanging = False
    End If

    Have fun......

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jan 2000
    Location
    Fresno, California, USA
    Posts
    195
    I was hoping for something more elegant. I had already done something like this stuff hoping for the perfect solution. Don't let me down. Thanks.

  5. #5
    Guest
    Try this.

    Code:
    Option1.Value = True

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Jan 2000
    Location
    Fresno, California, USA
    Posts
    195
    Megatron, that fires the click event for the option button. I don't want the click event to fire.

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