help to speed up adding check box

  • Thread starter Thread starter jono1970
  • Start date Start date
J

jono1970

hello,

I need to place 50 check boxes in column D of my worksheet. Currentl
I go to *view*, *toolbox*, *forms* and drag a check box object in to
cell. I then have to edit, size and place it within the cell. Is ther
a way to quickly replicate this in VBA. I would appreciate it i
somebody could show me how to do this.

Thanks in advance.

Jon
 
Turn on the macro recorder while you do it manually. then generalize the
code and put in a loop.
 
Jono,

Here is a code that I recorded abd modified.

HTH


Charles


Sub Macro1()
'
' Macro1 Macro
' Macro recorded 10/24/2004 by Charles Harmon
'

'
Application.CommandBars("Forms").Visible = True
Do While cnt <> 50
cnt = cnt + 1
If cnt = 1 Then
mynum = 27
End If
ActiveSheet.CheckBoxes.Add(15, mynum, 72, 72).Select
Selection.ShapeRange.Height = 7#
mynum = mynum + 30
Loop
Application.CommandBars("Forms").Visible = fales
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Check boxes 4
Check box counting 7
VBA to Make Check Box Entry 5
Check Box Question 1
Check box 4
Check Box Help 4
protect check box and cells 2
[Q] For, Next - How to Speed Up 6

Back
Top