Hi,
I have created ActiveX checkboxes named chkbx1 and chkbx2. I am running a loop and I need to refer to these objects. I am not sure what is wrong with my code:
for i=1 to 2
if "chkbx" & i & .Object.Value = True then
'Do something
End If
next i
Hi,
I have created ActiveX checkboxes named chkbx1 and chkbx2. I am running a loop and I need to refer to these objects. I am not sure what is wrong with my code:
for i=1 to 2
if "chkbx" & i & .Object.Value = True then
'Do something
End If
next i
Last edited by excelnewbie80; 06-18-2012 at 03:57 AM.
Dear ,
all the controls on the sheets are referred as Shape
try the below code
Sub hhgg()
Dim x As Shapes
Dim y As Long
Dim z As Long
Dim str As String
Set x = Application.Sheets(1).Shapes
y = x.Count
For z = 1 To y
str = str & Chr(13) & " " & x(z).Name
Next z
MsgBox str
End Sub
Instead of Using ActiveX Use normal controls Because u can attach them to any any cell value.
Like this:
Although if you use forms controls, you can use:![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks