Hello,
So I building a custom graphing engine in Excel (2000 SR-1/2003). I'm working with a single chart sheet and want to create a vertical line ([tt]shpTracker[/tt]) that tracks the mouse pointer in the [tt]Plot Area[/tt] of the chart. Eventually the line position will update a 'dashboard' with statistics that correspond to the position of the vertical line within the [tt]Plot Area[/tt] (phase 2).
Working with the [tt]MouseMove()[/tt] event I can get [tt]shpTracker[/tt] to respond to the mouse movement and track across the chart, but I'm struggling to get [tt]shpTracker[/tt] to line up with the mouse pointer on the screen.
So here's the question: Does anyone have a method for converting the [tt]x[/tt] value from the [tt]MouseMove()[/tt] event to a corresponding position in the [tt]Plot Area[/tt] or [tt]Chart[/tt] that I can use to set the [tt]Left[/tt] property of [tt]Shape[/tt] at run time?
I have tried using the [tt]x[/tt] value directly, converting it with [tt]PointsToScreenPixelsX()[/tt], adjusting for [tt]Left[/tt] property of the both the [tt]Plot Area[/tt] and [tt]Chart[/tt], taken into account the [tt]Width[/tt] properties and everytime I have something close I change the Zoom on the chart and I'm back at square one.
Thanks in advance for any input you can provide,
CMP
[small]For the best results do what I'm thinking, not what I'm saying.[/small]
(GMT-07:00) Mountain Time (US & Canada)
So I building a custom graphing engine in Excel (2000 SR-1/2003). I'm working with a single chart sheet and want to create a vertical line ([tt]shpTracker[/tt]) that tracks the mouse pointer in the [tt]Plot Area[/tt] of the chart. Eventually the line position will update a 'dashboard' with statistics that correspond to the position of the vertical line within the [tt]Plot Area[/tt] (phase 2).
Working with the [tt]MouseMove()[/tt] event I can get [tt]shpTracker[/tt] to respond to the mouse movement and track across the chart, but I'm struggling to get [tt]shpTracker[/tt] to line up with the mouse pointer on the screen.
So here's the question: Does anyone have a method for converting the [tt]x[/tt] value from the [tt]MouseMove()[/tt] event to a corresponding position in the [tt]Plot Area[/tt] or [tt]Chart[/tt] that I can use to set the [tt]Left[/tt] property of [tt]Shape[/tt] at run time?
I have tried using the [tt]x[/tt] value directly, converting it with [tt]PointsToScreenPixelsX()[/tt], adjusting for [tt]Left[/tt] property of the both the [tt]Plot Area[/tt] and [tt]Chart[/tt], taken into account the [tt]Width[/tt] properties and everytime I have something close I change the Zoom on the chart and I'm back at square one.
Thanks in advance for any input you can provide,
CMP
[small]For the best results do what I'm thinking, not what I'm saying.[/small]
(GMT-07:00) Mountain Time (US & Canada)