ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   checkbox hell (https://www.excelbanter.com/excel-programming/304226-re-checkbox-hell.html)

eRiC

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


All times are GMT +1. The time now is 07:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com