Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I can use this to get the option buttons name...
For Each ctl In ActiveSheet.Shapes If Left(ctl.Name, 12) = "OptionButton" Then MsgBox ctl.Name Next ctl How can I modify it to get the selected or not value or status? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'd use:
Dim OLEObj As OLEObject For Each OLEObj In Activesheet.OLEObjects If TypeOf OLEObj.Object Is MSForms.OptionButton Then msgbox OLEObj.Object.Value End If Next OLEObj If you renamed any of your optionbuttons to avoid them in the loop, then my suggestion won't work. Snowfire wrote: I can use this to get the option buttons name... For Each ctl In ActiveSheet.Shapes If Left(ctl.Name, 12) = "OptionButton" Then MsgBox ctl.Name Next ctl How can I modify it to get the selected or not value or status? -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On 30 Jan, 20:33, Dave Peterson wrote:
I'd use: * * Dim OLEObj As OLEObject * * * * For Each OLEObj In Activesheet.OLEObjects * * * * If TypeOf OLEObj.Object Is MSForms.OptionButton Then * * * * * * msgbox OLEObj.Object.Value * * * * End If * * Next OLEObj If you renamed any of your optionbuttons to avoid them in the loop, then my suggestion won't work. Dave Peterson Works a treat !!!! Thanks Dave.... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Option Buttons/Radio Buttons | New Users to Excel | |||
Option buttons: How to get the selected option from a group? | Excel Programming | |||
Pole nazvov | Excel Programming | |||
Navigating between option buttons is not selecting the option | Excel Programming | |||
Navigating between option buttons is not selecting the option | Excel Programming |