Lock Position of Controls on a UserForm

R

RyanH

Is there a way to lock the position of controls on a Userform? I access the
controls events by double clicking them and sometimes I accidentally move
them in the process. Just want to avoid this if possible.
 
J

Jim Rech

I move controls accidentally all the time. While I don't think there is a
way to lock them down a quick Ctrl-z rights them if you notice it in time.

--
Jim
| Is there a way to lock the position of controls on a Userform? I access
the
| controls events by double clicking them and sometimes I accidentally move
| them in the process. Just want to avoid this if possible.
| --
| Cheers,
| Ryan
 
R

Rick Rothstein

If this is really a big problem for you, here is something you can try. Put
an Image control on your form and make it cover the entire working area
(where the controls go) of the form (actually, make it bigger than the form
and center it over the form). Next, set its BackStyle property to
0-fmBackStyleTransparent in the Properties window. Now, when you place a
control on the form and get it exactly where you want it, use
Format/Order/SendToBack on the menu bar (or click Ctrl+K instead) to put it
behind the Image control. You will still be able to see it, but you can't
select it directly anymore (the Image control is in the way); however, while
it doesn't look selected, clicking over it will still make it available in
the Properties window if you want to change any of its properties. If you do
need to directly select it in the future, you can press the Tab key
repeatedly until it becomes selected.
 
R

RyanH

I guess there is no magical method to call to lock the positions of all the
controls. I appreciate the ideas, but its dosn't present that big of a
problem to where I would want to in convience myself to select them in the
future. Thanks for the thoughts!
--
Cheers,
Ryan


Rick Rothstein said:
If this is really a big problem for you, here is something you can try. Put
an Image control on your form and make it cover the entire working area
(where the controls go) of the form (actually, make it bigger than the form
and center it over the form). Next, set its BackStyle property to
0-fmBackStyleTransparent in the Properties window. Now, when you place a
control on the form and get it exactly where you want it, use
Format/Order/SendToBack on the menu bar (or click Ctrl+K instead) to put it
behind the Image control. You will still be able to see it, but you can't
select it directly anymore (the Image control is in the way); however, while
it doesn't look selected, clicking over it will still make it available in
the Properties window if you want to change any of its properties. If you do
need to directly select it in the future, you can press the Tab key
repeatedly until it becomes selected.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top