Select Control While in Design View

way2bord

Registered User.
Local time
Today, 11:32
Joined
Feb 8, 2013
Messages
177
Is there VBA code to select a control on a form that is currently in design view?
 
Why would you need to "select" it. You would refer to a control by name if you wanted to do something to it.
 
I've failed miserably at using names. :(

I've the feeling that Controls don't have names assigned until post-processing that occurs when you switch out of Design mode.

If you could provide a simple example that would be great.
 
You're going to have to tell us what you are trying to do. I rarely write code to manipulate objects since it can never run in completed applications so I probably don't even have anything relevant. The only time I might write it is if I have some massive change I need to make to lots of objects and I think I can do it better by writing code than by using the GUI.

If you are using code to create controls, populate their "Name" property with a value that makes sense to you and once it is saved, you can use the Name property to reference the control.
 
Test bed for dynamically designed forms.

Hand-in-Hand in my mind is manipulation of objects on existing forms.

Currently, I have a form with Box1 overlapping partially with Box2. I'm attempting to allow a user to move Box1 behind Box2 when Box1 is clicked in Form View.
 

Users who are viewing this thread

Back
Top Bottom