Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default moving controls in X & Y axis

Is there a hotkey that you can use when moving a control on a userform that
will only allow X or Y axis movement, so if you've already aligned it up with
another control, you don't have to realign it again if you need to move it
closer?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default moving controls in X & Y axis

For controls selected from the Control Toolbox, enter design mode, click the
control and use the arrow keys on the arrow keypad. For controls selected
from the Forms toolbar, right click the control and use the arrow keys on the
arrow keypad.
They move l, r, u and d.

"Charlie" wrote:

Is there a hotkey that you can use when moving a control on a userform that
will only allow X or Y axis movement, so if you've already aligned it up with
another control, you don't have to realign it again if you need to move it
closer?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default moving controls in X & Y axis

I tried that and I can't get it to work on my system. I'm using XL2003 if
that matters.

Rick


"JLGWhiz" wrote in message
...
For controls selected from the Control Toolbox, enter design mode, click
the
control and use the arrow keys on the arrow keypad. For controls selected
from the Forms toolbar, right click the control and use the arrow keys on
the
arrow keypad.
They move l, r, u and d.

"Charlie" wrote:

Is there a hotkey that you can use when moving a control on a userform
that
will only allow X or Y axis movement, so if you've already aligned it up
with
another control, you don't have to realign it again if you need to move
it
closer?


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default moving controls in X & Y axis

You're right, Rick. I missed the "on UserForm" part of the OP post. The
arrow keys only work on a sheet. The alignment facility appears to be the
quickest way on a UserForm.

"Rick Rothstein (MVP - VB)" wrote:

I tried that and I can't get it to work on my system. I'm using XL2003 if
that matters.

Rick


"JLGWhiz" wrote in message
...
For controls selected from the Control Toolbox, enter design mode, click
the
control and use the arrow keys on the arrow keypad. For controls selected
from the Forms toolbar, right click the control and use the arrow keys on
the
arrow keypad.
They move l, r, u and d.

"Charlie" wrote:

Is there a hotkey that you can use when moving a control on a userform
that
will only allow X or Y axis movement, so if you've already aligned it up
with
another control, you don't have to realign it again if you need to move
it
closer?



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default moving controls in X & Y axis

In the compiled version of VB, the IDE allows you to move controls using the
arrow keys coupled with the Ctrl key; however, it seem the IDE designers in
VBA did not implement that very useful key combination. The only way I could
find to do what you want is somewhat cumbersome to do and it assumes you
have your "Align Controls to Grid" option enabled. Let's say you want to
move you control horizontally... click on Tools/Options on the menu bar,
click the General tab and change the Grid Units Height to 60 (make sure
there is a check mark in the "Align Controls to Grid" CheckBox) and then
press OK. You will now be able to move your control left and right without
worrying about vertical movement. To move your control vertically instead of
horizontally, do the same as above except set the Grid Units Height to 60
instead.

Rick


"Charlie" wrote in message
...
Is there a hotkey that you can use when moving a control on a userform
that
will only allow X or Y axis movement, so if you've already aligned it up
with
another control, you don't have to realign it again if you need to move it
closer?




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default moving controls in X & Y axis

hmmm, too bad, it is quite cumbersome, quicker just to move it freehand, and
realign with the other control...
thanks.


"Rick Rothstein (MVP - VB)" wrote:

In the compiled version of VB, the IDE allows you to move controls using the
arrow keys coupled with the Ctrl key; however, it seem the IDE designers in
VBA did not implement that very useful key combination. The only way I could
find to do what you want is somewhat cumbersome to do and it assumes you
have your "Align Controls to Grid" option enabled. Let's say you want to
move you control horizontally... click on Tools/Options on the menu bar,
click the General tab and change the Grid Units Height to 60 (make sure
there is a check mark in the "Align Controls to Grid" CheckBox) and then
press OK. You will now be able to move your control left and right without
worrying about vertical movement. To move your control vertically instead of
horizontally, do the same as above except set the Grid Units Height to 60
instead.

Rick


"Charlie" wrote in message
...
Is there a hotkey that you can use when moving a control on a userform
that
will only allow X or Y axis movement, so if you've already aligned it up
with
another control, you don't have to realign it again if you need to move it
closer?



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default moving controls in X & Y axis

Yes, I did say it was cumbersome. <g

JLGWhiz posted a procedure that I can't get to work on my system; however,
you should give it a try in case it will work for you... if it works, it
would be very simple to use.

Rick


"Charlie" wrote in message
...
hmmm, too bad, it is quite cumbersome, quicker just to move it freehand,
and
realign with the other control...
thanks.


"Rick Rothstein (MVP - VB)" wrote:

In the compiled version of VB, the IDE allows you to move controls using
the
arrow keys coupled with the Ctrl key; however, it seem the IDE designers
in
VBA did not implement that very useful key combination. The only way I
could
find to do what you want is somewhat cumbersome to do and it assumes you
have your "Align Controls to Grid" option enabled. Let's say you want to
move you control horizontally... click on Tools/Options on the menu bar,
click the General tab and change the Grid Units Height to 60 (make sure
there is a check mark in the "Align Controls to Grid" CheckBox) and then
press OK. You will now be able to move your control left and right
without
worrying about vertical movement. To move your control vertically instead
of
horizontally, do the same as above except set the Grid Units Height to 60
instead.

Rick


"Charlie" wrote in message
...
Is there a hotkey that you can use when moving a control on a userform
that
will only allow X or Y axis movement, so if you've already aligned it
up
with
another control, you don't have to realign it again if you need to move
it
closer?




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default moving controls in X & Y axis

Hi,

Check out Stephen Bullen's VBE Tools.
http://www.oaltd.co.uk/VBETools/Default.htm

Cheers
Andy

Charlie wrote:
hmmm, too bad, it is quite cumbersome, quicker just to move it freehand, and
realign with the other control...
thanks.


"Rick Rothstein (MVP - VB)" wrote:


In the compiled version of VB, the IDE allows you to move controls using the
arrow keys coupled with the Ctrl key; however, it seem the IDE designers in
VBA did not implement that very useful key combination. The only way I could
find to do what you want is somewhat cumbersome to do and it assumes you
have your "Align Controls to Grid" option enabled. Let's say you want to
move you control horizontally... click on Tools/Options on the menu bar,
click the General tab and change the Grid Units Height to 60 (make sure
there is a check mark in the "Align Controls to Grid" CheckBox) and then
press OK. You will now be able to move your control left and right without
worrying about vertical movement. To move your control vertically instead of
horizontally, do the same as above except set the Grid Units Height to 60
instead.

Rick


"Charlie" wrote in message
...

Is there a hotkey that you can use when moving a control on a userform
that
will only allow X or Y axis movement, so if you've already aligned it up
with
another control, you don't have to realign it again if you need to move it
closer?



  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default moving controls in X & Y axis

Just a footnote. You cannot make the adjustments while the code is running,
in case that was your question. The adjustments can only be made when there
is no procedure in process.

"Charlie" wrote:

Is there a hotkey that you can use when moving a control on a userform that
will only allow X or Y axis movement, so if you've already aligned it up with
another control, you don't have to realign it again if you need to move it
closer?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with moving controls Tom Ogilvy Excel Programming 0 January 16th 07 01:29 AM
How do I stop active x controls from moving after a print preview mleavitt Excel Discussion (Misc queries) 2 September 12th 05 08:47 PM
Moving amouse over controls CHEPChap Excel Programming 1 July 14th 05 12:33 PM
ActiveX Controls moving upon print/printpreview Steven Cheng Excel Discussion (Misc queries) 6 February 2nd 05 03:31 AM
Controls Moving Rod Jones Excel Programming 1 June 11th 04 09:57 AM


All times are GMT +1. The time now is 11:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"