Pasting ActiveX or Form Controls

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am building a template, which I'd like to contain numerous check boxes. I
may have up to 10,000 or more check boxes, 10 per row, 1,000 rows. Is there
a way to copy and paste one row, and have the pasted check boxes linked cell
update automatically? In other words, if I have one check box per cell in
row 9, and each is linked to the cell in which it is contained, (i.e. b9, c9,
d9, etc.) I would like to repeat the format on the next 500 - 1000 rows,
having each control linked to its respective cell. So, the column would stay
the same, and the row would change. Is there a way to do that without having
to enter the properties or format control and changing each one separately?

Thanks in advance,
Jason
 
Jason,

Rather than use checkboxes, how about inputting directly into the cells,
using the Marlett font and event code. Here is a msimple example using cells
A1:A100, but you can adapt that.. You just check the cell value for a then
to finf a tick,

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.EnableEvents = False
On Error GoTo sub_exit
If Not Intersect(Target, Range("A1:A100")) Is Nothing Then
With Target
If .Value = "a" Then
.Value = ""
Else
.Value = "a"
.Font.Name = "Marlett"
End If
.Offset(0, 1).Select
End With
End If
sub_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.



--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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

Back
Top