General question: how many controls allowed?

M

Mekratrig

I looked in the Excel/VB help, but couldn't find the answer to thi
question: How many form controls can be placed on a worksheet? Or i
there any limit other than that imposed by the computer'
memeory/storage
 
K

keepITcool

i've just tested and it depends..

the NATIVE controls from forms toolbar..
you can easily add 10000 controls.

if you're talking about embedded ole controls
i wouldn't do it...
look at your temp directory after running macro below :)

Sub DontUseManyOleObjects()

Const max = 500
Dim i%
Workbooks.Add
Application.EnableEvents = False
Application.ScreenUpdating = False
'with ActiveSheet.CheckBoxes.Add(5, 1, 72, 18)
With ActiveSheet.OLEObjects.Add(ClassType:="Forms.CheckBox.1", _
Link:=False, DisplayAsIcon:=False, _
Left:=100, Top:=1, Width:=108, Height:=18)

For i = 1 To max
With .Duplicate
.Top = ActiveSheet.Cells(2 * i, 1).Top
End With
Next
End With
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub




keepITcool

< email : keepitcool chello nl (with @ and .) >
< homepage: http://members.chello.nl/keepitcool >
 
Top