View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Lock Position of Controls on a UserForm

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.

--
Rick (MVP - Excel)


"RyanH" wrote in message
...
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