Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Moving shapes with the mouse
As Excel exposes neither the mouse movement on the worksheet nor a
Shape_Activate/Click or any other events, it's not straightforward. You could certainly use the API to hook the mouse and move the shape(s), but it would be much easier to give the user a modeless userform with button to click up/down and left/right which you can disable/enable depending on what you permit. Then you have your event to react to in moving the shapes, ensuring that Selection is what you expect. NickHK "pan65" wrote in message ... I have placed shapes on a spread sheet. I would like to write some code so that when one or more shapes are selected and moved with the mouse, the direction that the shape(s) can be moved is controled. For instance, the shape(s) can only moved up and down but never left or right. Can some one help me? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Moving shapes with the mouse
If you work with shapes on a chart, you can use chart events an procedures OnMouseMove, OnMouseUp, OnMouseDown... Read this page, it helped me: http://www.computorcompanion.com/LPMArticle.asp?ID=221 I have also anoter question related to this: How to make excel NOT to change mouse cursor when placing on shape an how to make him IGNORE clicks on shape (not selecting it). I made som cross cursors which follow the mouse in chart, but I cant selec serries data by click now, because always when I click somewhere, thi moving cursors are selected... (created with shapes.addline... -- pjakop ----------------------------------------------------------------------- pjakop1's Profile: http://www.excelforum.com/member.php...fo&userid=3747 View this thread: http://www.excelforum.com/showthread.php?threadid=57121 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Moving Shapes | Excel Discussion (Misc queries) | |||
inserted shapes keep moving | Excel Discussion (Misc queries) | |||
Shapes and Arrows Moving | Excel Discussion (Misc queries) | |||
Moving Shapes with the mouse | New Users to Excel | |||
moving mouse highlights cells without touching left mouse button | Excel Discussion (Misc queries) |