C
clickmagundi
Hello,
I'm trying to automate the process of putting checkboxes with their
associated cell link down column Q - say 100. It is tedious to do it
manually. The macro I've recorded looks like this:
Sub CheckboxesDown()
ActiveSheet.CheckBoxes.Add(866, 189.75, 24, 17.25).Select '189.75
need to increment by 14.25 ?? each loop as below
Selection.Characters.Text = ""
With Selection
.Value = xlOff
.LinkedCell = "Q14" ' needs to increment by 1 each loop as
below
.Display3DShading = False
End With
ActiveSheet.CheckBoxes.Add(866, 204, 24, 17.25).Select
Selection.Characters.Text = ""
With Selection
.Value = xlOff
.LinkedCell = "Q15"
.Display3DShading = False
End With
ActiveSheet.CheckBoxes.Add(866, 218.25, 24, 17.25).Select
Selection.Characters.Text = ""
With Selection
.Value = xlOff
.LinkedCell = "Q16"
.Display3DShading = False
End With
ActiveSheet.CheckBoxes.Add(866, 232.5, 24, 17.25).Select
Selection.Characters.Text = ""
With Selection
.Value = xlOff
.LinkedCell = "Q17"
.Display3DShading = False
End With
ActiveSheet.CheckBoxes.Add(866, 246.75, 24, 17.25).Select
Selection.Characters.Text = ""
With Selection
.Value = xlOff
.LinkedCell = "Q18"
.Display3DShading = False
End With
ActiveSheet.CheckBoxes.Add(866, 261, 24, 17.25).Select
Selection.Characters.Text = ""
With Selection
.Value = xlOff
.LinkedCell = "Q19"
.Display3DShading = False
End With
End Sub
As I've shown I believe it needs a do loop for two elements the
position of the checkbox and the cell link.
The "189.75 to increment by 14.25" isn't quite right as the
checkboxes nudge up each time so I guess it needs something like plus
14.25, next one plus 14.26?. it needs to be in the same position above
the linked cell each time.
Would appreciate some help.
Many thanks
I'm trying to automate the process of putting checkboxes with their
associated cell link down column Q - say 100. It is tedious to do it
manually. The macro I've recorded looks like this:
Sub CheckboxesDown()
ActiveSheet.CheckBoxes.Add(866, 189.75, 24, 17.25).Select '189.75
need to increment by 14.25 ?? each loop as below
Selection.Characters.Text = ""
With Selection
.Value = xlOff
.LinkedCell = "Q14" ' needs to increment by 1 each loop as
below
.Display3DShading = False
End With
ActiveSheet.CheckBoxes.Add(866, 204, 24, 17.25).Select
Selection.Characters.Text = ""
With Selection
.Value = xlOff
.LinkedCell = "Q15"
.Display3DShading = False
End With
ActiveSheet.CheckBoxes.Add(866, 218.25, 24, 17.25).Select
Selection.Characters.Text = ""
With Selection
.Value = xlOff
.LinkedCell = "Q16"
.Display3DShading = False
End With
ActiveSheet.CheckBoxes.Add(866, 232.5, 24, 17.25).Select
Selection.Characters.Text = ""
With Selection
.Value = xlOff
.LinkedCell = "Q17"
.Display3DShading = False
End With
ActiveSheet.CheckBoxes.Add(866, 246.75, 24, 17.25).Select
Selection.Characters.Text = ""
With Selection
.Value = xlOff
.LinkedCell = "Q18"
.Display3DShading = False
End With
ActiveSheet.CheckBoxes.Add(866, 261, 24, 17.25).Select
Selection.Characters.Text = ""
With Selection
.Value = xlOff
.LinkedCell = "Q19"
.Display3DShading = False
End With
End Sub
As I've shown I believe it needs a do loop for two elements the
position of the checkbox and the cell link.
The "189.75 to increment by 14.25" isn't quite right as the
checkboxes nudge up each time so I guess it needs something like plus
14.25, next one plus 14.26?. it needs to be in the same position above
the linked cell each time.
Would appreciate some help.
Many thanks