I'm still at a loss as to how to make this work. ![]() ShpTracker stays closer than anything else I've tried once I move the mouse over the entire Plot Area. Me.Shapes("shpTracker").Visible = msoFalse I have the functions necessary for the management of a window (including the window procedure) in a window class, and have tried declaring a TRACKMOUSEEVENT member in the class to be used by TrackMouseEvent (), but this only results in no message being displayed - neither WMMOUSELEAVE nor WMMOUSEHOVER is captured this way - I thought it odd. Me.Shapes("shpTracker").Left = Me.PlotArea.InsideLeft + Int(((x - lngPlotAreaLeftX) / (lngPlotAreaRightX - lngPlotAreaLeftX)) * Me.PlotArea.InsideWidth) If lngPlotAreaLeftX = 0 Or x lngPlotAreaRightX Then Me.Shapes("shpTracker").Visible = msoTrue Private Sub Chart_MouseMove(ByVal Button As Long, ByVal Shift As Long, ByVal x As Long, ByVal y As Long)ĪctiveChart.GetChartElement x, y, lngElementID, a, b ![]() Private lngPlotAreaLeftX As Long, lngPlotAreaRightX As Long (GMT-07:00) Mountain Time (US & Canada) RE: Translating Mouse coordinates to Excel Chart position SkipVought (Programmer) 3 Aug 06 12:05 Best answer Kelly Coull Level 4 1,424 points It does not use an AppleScript, Shell Script or anything else, but if you are just looking to get the coordinates of the mouse on the screen, +command, shift 4+ will give you the coordinates. Thanks in advance for any input you can provide,įor the best results do what I'm thinking, not what I'm saying. I have tried using the x value directly, converting it with PointsToScreenPixelsX(), adjusting for Left property of the both the Plot Area and Chart, taken into account the Width properties and everytime I have something close I change the Zoom on the chart and I'm back at square one. So here's the question: Does anyone have a method for converting the x value from the MouseMove() event to a corresponding position in the Plot Area or Chart that I can use to set the Left property of Shape at run time? Working with the MouseMove() event I can get shpTracker to respond to the mouse movement and track across the chart, but I'm struggling to get shpTracker to line up with the mouse pointer on the screen. ![]() Eventually the line position will update a 'dashboard' with statistics that correspond to the position of the vertical line within the Plot Area (phase 2). I'm working with a single chart sheet and want to create a vertical line ( shpTracker) that tracks the mouse pointer in the Plot Area of the chart. So I building a custom graphing engine in Excel (2000 SR-1/2003).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |