Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Mouse over effect on autoshape
The line chart hilite effect is really great (especially on a black
bacground, thanks Andy ). http://www.pdbook.com/index.php/excel/comment/635/ Does anyone know how one would modify it so that you for example have an autoshape the same colour as the line on the chart and when you mouse over it it lights up (hilites, it really is a great effect) the line on the chart? The other effect I would really love to achieve is a similar effect with the pie chart where when you mouse over a slice, it's border hilites in the same way as the line on the line chart. Thanks again, kind regards, Mark |
#2
|
|||
|
|||
Mark -
In the first chart, name the shapes "shpSeries1", "shpSeries2" etc. This is the framework for the code you want: Private Sub Chart_MouseMove(ByVal Button As Long, ByVal Shift As Long, ByVal x As Long, ByVal y As Long) Dim ElementID As Long, Arg1 As Long, Arg2 As Long GetChartElement x, y, ElementID, Arg1, Arg2 Application.StatusBar = ElementID & ", " & Arg1 & ", " & Arg2 If ElementID = xlShape Then If Left(ActiveChart.Shapes(Arg1).Name, 9) = "shpSeries" Then With ActiveChart.SeriesCollection _ (CLng(Mid(ActiveChart.Shapes(Arg1).Name, 10))) ' change color etc. End With End If End If End Sub For the pie chart, you are changing the border formatting. Andy's effect that changes the data in a second line chart series so it now appears won't work with the pie, but my approach that changes the connecting line format can be modified. Record a macro while you change the formatting of a pie slice to see the syntax. Note that you need to know which point you are mousing over, so you need to use Arg2 (point number) as well as Arg1 (series number). - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ Mark Stephens wrote: The line chart hilite effect is really great (especially on a black bacground, thanks Andy ). http://www.pdbook.com/index.php/excel/comment/635/ Does anyone know how one would modify it so that you for example have an autoshape the same colour as the line on the chart and when you mouse over it it lights up (hilites, it really is a great effect) the line on the chart? The other effect I would really love to achieve is a similar effect with the pie chart where when you mouse over a slice, it's border hilites in the same way as the line on the line chart. Thanks again, kind regards, Mark |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Create shadow effect on with chart | Charts and Charting in Excel | |||
Mouse continues to select after clicking on a cell in excel. | Excel Discussion (Misc queries) | |||
moving mouse highlights cells without touching left mouse button | Excel Discussion (Misc queries) | |||
moving mouse lighlights cells | Excel Discussion (Misc queries) | |||
moving mouse highlights cells. why? | Excel Discussion (Misc queries) |