cdiwindows
MIS
Is there a way to "snap" a row or column of command buttons to align the tops or lefts on a worksheet? Even have the ability to get in and modify the left and top properties would work, if possible.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Sub AlignButtons()
Dim oBtn As OLEObject
With ActiveSheet
For Each oBtn In .OLEObjects
If InStr(1, oBtn.Name, "CommandButton", vbTextCompare) > 0 Then
oBtn.Top = oBtn.TopLeftCell.Top
oBtn.Left = oBtn.TopLeftCell.Left
End If
Next oBtn
End With
End Sub