|
-
March 29th, 2001, 02:41 PM
#1
Registered User
Easy Visual Basic Question....
How do I set an option button so it is automatically selected and is the default button when a form loads?
It is located in a group of 6 other option buttons in a frame.
-
March 29th, 2001, 03:05 PM
#2
You set the tabindex property of the button to 0 and consecutively after that. Hope that helps.
-
March 29th, 2001, 03:07 PM
#3
if the option where named "option"
If I were in front of a compiler I could tell you FOR SURE.
on the load sub
sub form_load
option(N).selected=true
end sub
where N is the index in the array.
I'll post back the right answer if I am wrong.
-
March 29th, 2001, 07:32 PM
#4
Private Sub Form_Load()
optButton.Value = True
End Sub
where optButton is the name of the button you want selected
CJK's suggestion also works
-
March 30th, 2001, 06:19 AM
#5
Yeah those two are right...don't use my suggestion for selected isn't even a value in an option. I suck.
-
March 30th, 2001, 09:56 AM
#6
that sounds right.. boy its been a while since ive had to call forth the VB code from the recesses of high skool programming(in fact, it was just last year!!)
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
|
|
Bookmarks