Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checking the value of a radiobutton in Excel VBA 1

Status
Not open for further replies.

deb18

Programmer
May 19, 2003
40
US
I have the following code:
Code:
    Do Until [ ... ]
        repName = wrksheet.Cells(currentInputRow, "A")
        
        'does user want to process commissions for this user?
        If mainForm.repsNames_frame.allOrSome_frame.someReps_rb.Value = True Then 'if this button is checked, user only wants some reps
            ' do lots of stuff...
        End If
    Loop

I'm getting the error "Object doesn't support this property or method" on the line beginning with "IF". What's the proper way for me to check the value of a radiobutton, or in other words, why isn't this working? (As you can see from the current reading of that line, the readiobutton is enveloped in a frame inside of another frame.)

Thanks so much,
Deb
 
This should be enough to get the value of the radiobutton:

[tt]If mainForm.someReps_rb.Value = True Then[/tt]

*cLFlaVA
----------------------------
Ham and Eggs walks into a bar and asks, "Can I have a beer please?"
The bartender replies, "I'm sorry, we don't serve breakfast.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top