Events on controls generated on the fly...

S

ste

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.OptionButton.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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top