thectosian
New Member
- Joined
- Feb 13, 2011
- Messages
- 2
Hi,
I cut and pasted an online survey from my website into an excel spreasheet.
The page has a number of checkbox options which when one is selected, the others in the group are deselected, as expected.
I can 'see' the checkboxes as "Control 1" to "Control 19" using the code below.
What I can't figure out is how to access the checkbox to determine which control has its checked attribute set to true.
==== Code===
Dim shp As Shape
For Each shp In ActiveSheet.Shapes
If Left(shp.Name, 7) = "Control" Then
Sheets("Results").Cells(1, 1) = ":" & shp.Name & ":"
End If
Next shp
The frustrating bit is that I can see the Checked attribute in the VBA Properties list, [in development mode], so I figure that if it can be seen there, I should be able to get at it.
I'm aware that, unlike VB.Net, the CType operator doesn't work in VBA.
Can you help?
regards,
Duncan.
I cut and pasted an online survey from my website into an excel spreasheet.
The page has a number of checkbox options which when one is selected, the others in the group are deselected, as expected.
I can 'see' the checkboxes as "Control 1" to "Control 19" using the code below.
What I can't figure out is how to access the checkbox to determine which control has its checked attribute set to true.
==== Code===
Dim shp As Shape
For Each shp In ActiveSheet.Shapes
If Left(shp.Name, 7) = "Control" Then
Sheets("Results").Cells(1, 1) = ":" & shp.Name & ":"
End If
Next shp
The frustrating bit is that I can see the Checked attribute in the VBA Properties list, [in development mode], so I figure that if it can be seen there, I should be able to get at it.
I'm aware that, unlike VB.Net, the CType operator doesn't work in VBA.
Can you help?
regards,
Duncan.