Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 38
Default Mouse Up or Down Event

I have a good code to capture and extract data from a chart using a MouseUp
event (Thanks to Jon Peltier) - now I would like to push my luck and ask for
additional help.
My current code allows me to capture an "X" value and paste it into another
analysis area. I would like to be able to capture a second value; can I set
something up to capture the second value with a right click or maybe a
Ctrl-click?
The user would then click a second time to get the second value.

Is this possible?

Thanks for the help.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6,582
Default Mouse Up or Down Event

You could use the same even procedure, and make it smart enough to know the
first value has been selected so it adds the new value to a different cell.

Or you can put the value into a different cell based on the button that was
clicked. The procedure starts with this line:

Private Sub Chart_MouseUp(ByVal Button As Long, ByVal Shift As Long, _
ByVal x As Long, ByVal y As Long)
Use something like this to direct the output: Select Case Button Case
xlPrimaryButton ' left click ' save in first cell Case
xlSecondaryButton ' right click ' save in second cell End Select

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"billinr" wrote in message
...
I have a good code to capture and extract data from a chart using a MouseUp
event (Thanks to Jon Peltier) - now I would like to push my luck and ask
for
additional help.
My current code allows me to capture an "X" value and paste it into
another
analysis area. I would like to be able to capture a second value; can I
set
something up to capture the second value with a right click or maybe a
Ctrl-click?
The user would then click a second time to get the second value.

Is this possible?

Thanks for the help.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 38
Default Mouse Up or Down Event

Thanks yet again for your help, Jon.
That solution is just what the boss wanted.

"Jon Peltier" wrote:

You could use the same even procedure, and make it smart enough to know the
first value has been selected so it adds the new value to a different cell.

Or you can put the value into a different cell based on the button that was
clicked. The procedure starts with this line:

Private Sub Chart_MouseUp(ByVal Button As Long, ByVal Shift As Long, _
ByVal x As Long, ByVal y As Long)
Use something like this to direct the output: Select Case Button Case
xlPrimaryButton ' left click ' save in first cell Case
xlSecondaryButton ' right click ' save in second cell End Select

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"billinr" wrote in message
...
I have a good code to capture and extract data from a chart using a MouseUp
event (Thanks to Jon Peltier) - now I would like to push my luck and ask
for
additional help.
My current code allows me to capture an "X" value and paste it into
another
analysis area. I would like to be able to capture a second value; can I
set
something up to capture the second value with a right click or maybe a
Ctrl-click?
The user would then click a second time to get the second value.

Is this possible?

Thanks for the help.




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
perform an event if mouse rolled over an object [email protected] Excel Worksheet Functions 0 September 5th 06 08:28 PM
mouse over event rk0909 Excel Discussion (Misc queries) 1 September 3rd 06 02:51 PM
my mouse moves diagonally when i scroll on mouse? BKMISHRA Excel Worksheet Functions 0 June 29th 05 11:43 AM
moving mouse highlights cells without touching left mouse button bremboy Excel Discussion (Misc queries) 2 January 27th 05 06:19 PM
Use the "mouse over" event to exclude a data point from a series Randall Hiltz Charts and Charting in Excel 10 January 19th 05 06:20 PM


All times are GMT +1. The time now is 05:54 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"