Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
perform an event if mouse rolled over an object | Excel Worksheet Functions | |||
mouse over event | Excel Discussion (Misc queries) | |||
my mouse moves diagonally when i scroll on mouse? | Excel Worksheet Functions | |||
moving mouse highlights cells without touching left mouse button | Excel Discussion (Misc queries) | |||
Use the "mouse over" event to exclude a data point from a series | Charts and Charting in Excel |