Kamis, 08 Desember 2011

[ExcelVBA] Re: "Bring to Front" a data series in a chart without changing sort order in legend

 

Thank you, Steve and David!
The macro looks great, but by now I solved my problem with Steve's answer, after realizing that there are 3 ways of selecting "Data" (in Chart Tools, on the Excel ribbon, and in the chart editing dialog box). The "little arrows" that Steve describes are actually not so little but unlabelled, in the dialog box, so I never noticed them before. I turned to full Excel 2007 mode to follow Steve's instructions, after it didn't seem to work in compatibility mode, but once I accepted these arrows into my accustomed world, they were there and worked in both modes. The only remaining reservation is that one cannot change the plotting order without changing the listing order in the Legend, in Excel 2007, but I can live with that.
My compliments for your follow-up perseverance!
Roger Belling

--- In ExcelVBA@yahoogroups.com, "David Smart" <smartware.consulting@...> wrote:
>
> Just tried recording a macro of myself moving the first series in the chart
> series order down a few positions:
>
> Option Explicit
>
> Sub Macro1()
> ActiveSheet.ChartObjects("Chart 1").Activate
> ActiveChart.SeriesCollection(1).Select
> ActiveChart.ChartGroups(1).SeriesCollection(1).PlotOrder = 4
> End Sub
>
> I don't have 2007 installed anywhere yet, so can't go looking at it. The
> above macro was recorded under 2003.
>
>
> Regards, Dave S
>
> ----- Original Message -----
> From: "Roger" <rogerbelling@...>
> To: <ExcelVBA@yahoogroups.com>
> Sent: Thursday, December 08, 2011 4:59 AM
> Subject: [ExcelVBA] Re: "Bring to Front" a data series in a chart without
> changing sort order in legend
>
>
> >
> > Thank you, David.
> >
> > I have Office Professional 2007 with all my Excel workbooks as .xls
> > files in 97/2003 compatibility mode for compatibility with other people,
> > under Vista Business w/o SP, and I cannot find any Series Order tab in
> > my Format Data Series box. (It would be parallel to Fill, Line Color,
> > Line Style etc., I suppose.) Is there some VBA phrasing that I could
> > try? I tend not to get tips when I want them, but always when they are
> > just distracting.
> >
> > Best regards, Roger Belling
> >
> >
> > --- In ExcelVBA@yahoogroups.com, <david.smart@> wrote:
> >>
> >> Don't know what version of Excel you're using, but in 2003 it's not
> > done
> >> with a "bring to front".
> >>
> >> In 2003, you bring up "Format Data Series", e.g. by right clicking on
> >> one of the data series in the chart.
> >>
> >> Then go to the tab "Series Order" and move your obscured series down
> > to
> >> bring them to the front.
> >>
> >>
> >> Regards, Dave S
> >>
> >>
> >>
> >> ________________________________
> >>
> >> From: ExcelVBA@yahoogroups.com [mailto:ExcelVBA@yahoogroups.com] On
> >> Behalf Of Roger
> >> Sent: Thursday, 1 December 2011 13:24
> >> To: ExcelVBA@yahoogroups.com
> >> Subject: [ExcelVBA] "Bring to Front" a data series in a chart without
> >> changing sort order in legend
> >>
> >>
> >>
> >>
> >>
> >> I use crosses as markers for regular data points, and colored squares
> >> for high-accuracy recalculations of outliers. When the recalculation
> >> has the same result as the original calculation, the square appears
> >> centered over the cross, if the cross is big enough to show from under
> >> the square. The picture would be even better, for a publication, if
> > the
> >> crosses showed on top of the squares. But the crosses as the normal
> >> markers I still want to appear on top in the legend.
> >>
> >> I imagine there is a way to do a "Bring to Front" on the regular data
> >> series? My button is greyed out in Drawing Tools, and I cannot find a
> >> handle in VBA either. My chart shows only under ActiveSheet.Shapes,
> > and
> >> I cannot find any command to do anything with it. (Besides I have a
> >> Shape for pointing to one particular data point, grouped with the
> > chart,
> >> which may complicate matters somewhat.)
> >>
> >> Thanks if you can help. Roger Belling
> >>
> >>
> >>
> >>
> >>
> >> ----------
> >>
> >> Visit our website at http://www.ubs.com
> >>
> >> This message contains confidential information and is intended only
> >> for the individual named. If you are not the named addressee you
> >> should not disseminate, distribute or copy this e-mail. Please
> >> notify the sender immediately by e-mail if you have received this
> >> e-mail by mistake and delete this e-mail from your system.
> >>
> >> E-mails are not encrypted and cannot be guaranteed to be secure or
> >> error-free as information could be intercepted, corrupted, lost,
> >> destroyed, arrive late or incomplete, or contain viruses. The sender
> >> therefore does not accept liability for any errors or omissions in the
> >> contents of this message which arise as a result of e-mail
> > transmission.
> >> If verification is required please request a hard-copy version. This
> >> message is provided for informational purposes and should not be
> >> construed as a solicitation or offer to buy or sell any securities
> >> or related financial instruments.
> >>
> >>
> >> UBS reserves the right to retain all messages. Messages are protected
> >> and accessed only in legally justified cases.
> >>
> >> [Non-text portions of this message have been removed]
> >>
> >
> >
> >
> >
> >
> > ------------------------------------
> >
> > ----------------------------------
> > Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go
> > here: http://www.mousetrax.com/techtrax to enter the ezine, then search
> > the ARCHIVES for EXCEL VBA.
> >
> > ----------------------------------
> > Visit our ExcelVBA group home page for more info and support files:
> > http://groups.yahoo.com/group/ExcelVBA
> >
> > ----------------------------------
> > More free tutorials and resources available at:
> > http://www.mousetrax.com
> >
> > ----------------------------------Yahoo! Groups Links
> >
> >
> >
> >
> >
> > -----
> > No virus found in this message.
> > Checked by AVG - www.avg.com
> > Version: 10.0.1415 / Virus Database: 2102/4064 - Release Date: 12/06/11
> >
>

__._,_.___
Recent Activity:
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Tidak ada komentar:

Posting Komentar