|
-
Dec 14th, 2005, 05:47 PM
#1
Thread Starter
New Member
Dynamic Event Handling in Excel VB
Hi
I'm a VBforums newbie and VB amateur. I've search the www and this forum extensively but still can't find the answer to my question (although I'm sure it's there). (Great forum BTW).
The problem:
In Excel VB I am dynamically creating a form with sliders (from the MSComctlLib.Slider library), the number of which is varyable (5 to 100). I can name the sliders and create textboxes with corresponding numbers to display the value of the slider (i.e. slider01 : textbox01, slider02 : textbox02...slider98 : textbox98 etc).
But I cannot get a compact code that will basically say "when you click a slider, find the number of the slider and do stuff".
I've tried:
Private WithEvents newSlider As Slider
but can't get it to work. Similarly when I try Private WithEvents newlbl As Label (for instance), I get the error "Object does not source automation events".
I've fiddled with class modules but failed.
Can anyone out there give me any pointers?
Thanks - sorry if this is a repeated question
TW
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|