Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
Moving Shapes Preschool Mike Excel Discussion (Misc queries) 3 April 16th 10 10:45 PM
inserted shapes keep moving Stephid707 Excel Discussion (Misc queries) 1 February 16th 09 05:37 PM
Shapes and Arrows Moving dpparman Excel Discussion (Misc queries) 1 August 20th 08 01:04 AM
Moving Shapes with the mouse pan65 New Users to Excel 0 August 13th 06 06:35 AM
moving mouse highlights cells without touching left mouse button bremboy Excel Discussion (Misc queries) 2 January 27th 05 06:19 PM


All times are GMT +1. The time now is 02:25 PM.

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

About Us

"It's about Microsoft Excel"