Events on controls generated on the fly...
Hi there,
I have this sub that inserts some opition_buttons in my form... Sub AddOption(pag As Integer) Dim c As Control Set c = MultiPage1.Pages(pag).Controls.Add("Forms.OptionBu tton.1", "option", Visible) c.Caption = "Option:" c.Height = 20 c.Width = 100 c.Left = -50 c.Top = 5 + ((c.Top + c.Height) * CountOptionsInForm) c.Visible = True c.Tag = CountOptionsInForm End Sub is there a way to code events for those controls? I just need to handle the _change or the _click method... Thanks, ste |
Events on controls generated on the fly...
Here's some good info http://www.cpearson.com/excel/vbe.htm "ste" schreef in bericht ups.com... Hi there, I have this sub that inserts some opition_buttons in my form... Sub AddOption(pag As Integer) Dim c As Control Set c = MultiPage1.Pages(pag).Controls.Add("Forms.OptionBu tton.1", "option", Visible) c.Caption = "Option:" c.Height = 20 c.Width = 100 c.Left = -50 c.Top = 5 + ((c.Top + c.Height) * CountOptionsInForm) c.Visible = True c.Tag = CountOptionsInForm End Sub is there a way to code events for those controls? I just need to handle the _change or the _click method... Thanks, ste |
All times are GMT +1. The time now is 08:37 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com