View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default General question: how many controls allowed?

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.Check Box.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


Mekratrig wrote:

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


---
Message posted from http://www.ExcelForum.com/