|
-
Jul 14th, 2000, 12:56 PM
#1
Thread Starter
Addicted Member
How can I programatically change the value of an option button without firing the click event for that button?
-
Jul 14th, 2000, 01:07 PM
#2
Addicted Member
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
-
Jul 14th, 2000, 01:13 PM
#3
Junior Member
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......
-
Jul 14th, 2000, 01:16 PM
#4
Thread Starter
Addicted Member
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.
-
Jul 14th, 2000, 01:17 PM
#5
Try this.
Code:
Option1.Value = True
-
Jul 14th, 2000, 01:39 PM
#6
Thread Starter
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|