View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Events with diniamically added controls

Take a look here - I think the technique used there will apply.

http://www.j-walk.com/ss/excel/tips/tip44.htm
John Walkenbach's site.

--
Regards,
Tom Ogilvy

"fernando" wrote in message
...
Hi,

I have an application in VBA were I dinamically add several controls to a
form. Im creating arrays of variables of type Control to access the added
controls, for ex:

Set ctrl_graph(i) = page_id.Controls.Add(add_chkbox_string, "ctrl_graph" &
i)

Now I need to add events to this controls, but I have encountered that
'WithEvents' doesnt work with arrays. How can I add events to this
controls?

Greetings
Fernando