Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
ste ste is offline
external usenet poster
 
Posts: 18
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assigning events to runtime-created controls - is it possible? BizMark Excel Discussion (Misc queries) 1 November 20th 06 09:36 AM
Events for controls created on the fly on a userform John Austin[_3_] Excel Programming 3 March 7th 05 04:23 PM
Add Controls With Events at Runtime llowwelll Excel Programming 10 May 24th 04 11:52 AM
Events for Controls in a Multipage Control George[_18_] Excel Programming 4 February 18th 04 05:56 PM
Trapping Events generated by a Worksheet debartsa Excel Programming 3 November 28th 03 01:42 PM


All times are GMT +1. The time now is 06:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"