Created
October 28, 2014 09:36
-
-
Save thoriqmacto/d4fc5c4a6d09d7e6697a to your computer and use it in GitHub Desktop.
This routine will print checkbox object to the worksheet and dynamically assigned name to each of it.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub printCbox() | |
Dim i As Integer | |
Dim jmlhCSN As Integer | |
Dim left, topp As Double | |
Dim width, height As Double | |
jmlhCSN = 16 | |
For i = 1 To jmlhCSN | |
left = 10 'Cells(i,"A") | |
topp = Cells(i + 2, "A").top | |
width = 8 'Cells(i + 2, "A").width | |
height = Cells(i + 2, "A").height | |
ActiveSheet.CheckBoxes.Add(left, topp, width, height).Select | |
With Selection | |
.Caption = "" | |
.Value = xlOff | |
.LinkedCell = "AA" & i + 2 | |
.Display3DShading = False | |
End With | |
Next | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment