Option Button Question.

RaunLGoode

Registered User.
Local time
Today, 11:06
Joined
Feb 18, 2004
Messages
122
I have Several Option Buttons on a Form. I am trying to write an If statement and I am trying to read the Value and Caption property of each control. But I am having trouble with Object/Property. When I try "Opt1.Value" or Opt1.Caption I get an "Object Required (Error 424 )" message. When I look up the option controls in my VB book it says "Value" is the default value for the Option Button control and using ".Value" is optional. (this seems like a bad practice for a rookie like me). Trying the default still doesn't seem to work. Could somebody out there tell me why this is wrong and what the correct Object.Property would be for an Option button ?
 
How is the code running? From a button on the form? Try Me.Opt1.Value or [FormName].Opt1.Value
 
Right Now I have created a button that reads the properties of the control.
I am going to try to use a case statement. I have limited experience with Controls in Excel.
If I change the code to ActiveSheet.Opt1.Caption (or Value) it works now.
Thanks for the help
 

Users who are viewing this thread

Back
Top Bottom