ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How many checkboxes can you have? (https://www.excelbanter.com/excel-programming/418459-how-many-checkboxes-can-you-have.html)

Solution4U

How many checkboxes can you have?
 
I have 5 columns with over 100 check boxes in each. I keep getting an error
when the code runs unless I delete a certain portion of checkboxes. Right
now all is running well with 1195 checkboxes but if I add more I get the
error.

Does anyone know why this is happening or how to get around it?

joel

How many checkboxes can you have?
 
I was only able to add 1098 check boxes using the code below with Excel 2003.
I could not find any limits listed in the excel help that explains this
problem.


Sub Macro1()
'
' Macro1 Macro
' Macro recorded 10/13/2008 by Joel
'

'
LeftPos = Range("B1").Left

For RowCount = 2 To 4000 Step 2
TopPos = Range("B" & RowCount).Top
ActiveSheet.OLEObjects.Add _
ClassType:="Forms.CheckBox.1", _
Link:=False, _
DisplayAsIcon:=False, _
Left:=LeftPos, _
Top:=TopPos, _
Width:=108, _
Height:=19.5
Next RowCount
End Sub


"Solution4U" wrote:

I have 5 columns with over 100 check boxes in each. I keep getting an error
when the code runs unless I delete a certain portion of checkboxes. Right
now all is running well with 1195 checkboxes but if I add more I get the
error.

Does anyone know why this is happening or how to get around it?



All times are GMT +1. The time now is 02:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com