Capture events from runtime controls in a activex
Hello all,
i am working on a activex that makes some runtime controls into it!
Well i found the way to create them and then detroy them!
Now can anyone help on how to capture their events?
For example when i click the button with the name CMD23 a message appear telling me "You clicked CMD23"
:confused: :confused: :confused: :confused:
Re: Capture events from runtime controls in a activex
ok ive never done this but have you tried decalring your control object using the WithEvents Keyword?
i.e.
Code:
Dim WithEvents myControl As CommandButton
Set myControl = Controls.Add("VB.CommandButton", "myControl")
Then you should be able to access myControl from the object drop down box.
Re: Capture events from runtime controls in a activex
Just tested this out and it works fine :thumb:
Re: Capture events from runtime controls in a activex
Thanks appdalesolution! I tried and worked!
:) :) :) :)