View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
eRiC eRiC is offline
external usenet poster
 
Posts: 5
Default checkbox hell

the reason is the procedure only applys to active sheet
so u may make a loop to walk through

Private Sub CommandButton1_Click()
Dim myObj As OLEObject
For Each myObj In ActiveWorkbook.ActiveSheet.OLEObjects
Debug.Print myObj.Name
If Len(myObj.Name) 8 Then
If Left(myObj.Name, 8) = "CheckBox" Then
myObj.Left = 50
End if
End If
Next
End Sub