Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
 
MSDN Visual Basic Community
 
 
 
 
 
 
TitleToggle a disabled option button by using a label
DescriptionThis example shows how to toggle a disabled option button by using a label in Visual Basic 6.
Keywordsoption button, OptionButton, toggle
CategoriesControls
 
Thanks to Bill Matthews.

Normally one of a set of OptionButtons must be selected. If you have only one OptionButton in a group, you cannot deselect it.

This example places a Label control over a disabled OptionButton. The program uses the Label's Click event handler to toggle the OptionButton's value.

 
Private Sub Label1_Click()
    On Error Resume Next
    Option2.Value = Not Option2.Value
End Sub
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated