|
-
May 7th, 2004, 08:10 PM
#1
Thread Starter
PowerPoster
Accessing a Control from Me.Controls by name?
Basically I'm making a form that handles the mouseovers for multiple controls, and each form should interact with a slightly different control.
So I could do,
If control = "this one" then
'do stuff with this one
Else
etc.
Or, I could make things difficult for myself (this option is always the best).
I remember in VB6 you used to be able to access a control just by knowing its name (passing a method a string value) and I can't remember what it is anymore.
So basically the controls are like this (the mouseover stuff),
room1
room2
room3
And the the particular controls that they have to interact with will be,
room1Zone1
room2Zone1
So I can get the room part (which is all I need) from the Sender.Name property, I just can't figure out how I'm supposed to use it to access the rooms properties and stuff.
It was something like this,
Me.Controls("control name").text or whatever here
but Controls() expects the index of the control in question, so I dunno how I can find that. :doh:
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
|