PC Review


Reply
Thread Tools Rate Thread

Changing Displayed Data and Legends thru VBA

 
 
=?Utf-8?B?QmVuV2ViZXI=?=
Guest
Posts: n/a
 
      23rd May 2006
Are there any vba functions to change the data displayed in the data area of
the chart and/or legend text through VBA (ie not using the wizard, instead
need to do this in code)?

Specifically, I would like to put checkboxes on a worksheet to enable the
user to turn on-and-off data that's displayed in a chart (there's about 10
stats they could choose from, and it gets busy if all are shown).

Thanks!
-Ben
 
Reply With Quote
 
 
 
 
Del Cotter
Guest
Posts: n/a
 
      24th May 2006
On Tue, 23 May 2006, in microsoft.public.excel.charting,
BenWeber <(E-Mail Removed)> said:

>Are there any vba functions to change the data displayed in the data area of
>the chart and/or legend text through VBA (ie not using the wizard, instead
>need to do this in code)?
>
>Specifically, I would like to put checkboxes on a worksheet to enable the
>user to turn on-and-off data that's displayed in a chart (there's about 10
>stats they could choose from, and it gets busy if all are shown).


Pivot tables let you check and uncheck ranges. You may also be able to
use the controls available in the Form Design toolbar, if you don't want
to use a Pivot chart.

--
Del Cotter
NB Personal replies to this post will send email to (E-Mail Removed),
which goes to a spam folder-- please send your email to del3 instead.
 
Reply With Quote
 
Jon Peltier
Guest
Posts: n/a
 
      24th May 2006

"Del Cotter" <(E-Mail Removed)> wrote in message
news:g+(E-Mail Removed)...
> On Tue, 23 May 2006, in microsoft.public.excel.charting,
> BenWeber <(E-Mail Removed)> said:
>
>>Are there any vba functions to change the data displayed in the data area
>>of
>>the chart and/or legend text through VBA (ie not using the wizard, instead
>>need to do this in code)?
>>
>>Specifically, I would like to put checkboxes on a worksheet to enable the
>>user to turn on-and-off data that's displayed in a chart (there's about 10
>>stats they could choose from, and it gets busy if all are shown).

>
> Pivot tables let you check and uncheck ranges. You may also be able to use
> the controls available in the Form Design toolbar, if you don't want to
> use a Pivot chart.


For example:

http://peltiertech.com/Excel/Charts/ChartByControl.html

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


 
Reply With Quote
 
=?Utf-8?B?QmVuV2ViZXI=?=
Guest
Posts: n/a
 
      24th May 2006
Both good answers.

Problem for me is that i was trying to simplify the question. I'm actually
using the chart outside of excel (it's actually in MS Access). That's why i
tried to specify using VBA, although i did use "checkboxes on a spreadsheet"
in the example because I thoguht it would be the same method so would be
simpler.

Are there functions that allow you to change the data being displayed via
code?

Ie methods to do what you'd do in the wizard if you took a value out of the
stats being displayed in the data area of the chart?

Thanks!
-B

"Jon Peltier" wrote:

>
> "Del Cotter" <(E-Mail Removed)> wrote in message
> news:g+(E-Mail Removed)...
> > On Tue, 23 May 2006, in microsoft.public.excel.charting,
> > BenWeber <(E-Mail Removed)> said:
> >
> >>Are there any vba functions to change the data displayed in the data area
> >>of
> >>the chart and/or legend text through VBA (ie not using the wizard, instead
> >>need to do this in code)?
> >>
> >>Specifically, I would like to put checkboxes on a worksheet to enable the
> >>user to turn on-and-off data that's displayed in a chart (there's about 10
> >>stats they could choose from, and it gets busy if all are shown).

> >
> > Pivot tables let you check and uncheck ranges. You may also be able to use
> > the controls available in the Form Design toolbar, if you don't want to
> > use a Pivot chart.

>
> For example:
>
> http://peltiertech.com/Excel/Charts/ChartByControl.html
>
> - Jon
> -------
> Jon Peltier, Microsoft Excel MVP
> Tutorials and Custom Solutions
> http://PeltierTech.com
> _______
>
>
>

 
Reply With Quote
 
Jon Peltier
Guest
Posts: n/a
 
      24th May 2006
In Excel you can use VBA to change the data used by individual series or by
the entire chart. I don't know how charts work in Access.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"BenWeber" <(E-Mail Removed)> wrote in message
news:2A98A80B-2925-4B09-8A74-(E-Mail Removed)...
> Both good answers.
>
> Problem for me is that i was trying to simplify the question. I'm
> actually
> using the chart outside of excel (it's actually in MS Access). That's why
> i
> tried to specify using VBA, although i did use "checkboxes on a
> spreadsheet"
> in the example because I thoguht it would be the same method so would be
> simpler.
>
> Are there functions that allow you to change the data being displayed via
> code?
>
> Ie methods to do what you'd do in the wizard if you took a value out of
> the
> stats being displayed in the data area of the chart?
>
> Thanks!
> -B
>
> "Jon Peltier" wrote:
>
>>
>> "Del Cotter" <(E-Mail Removed)> wrote in message
>> news:g+(E-Mail Removed)...
>> > On Tue, 23 May 2006, in microsoft.public.excel.charting,
>> > BenWeber <(E-Mail Removed)> said:
>> >
>> >>Are there any vba functions to change the data displayed in the data
>> >>area
>> >>of
>> >>the chart and/or legend text through VBA (ie not using the wizard,
>> >>instead
>> >>need to do this in code)?
>> >>
>> >>Specifically, I would like to put checkboxes on a worksheet to enable
>> >>the
>> >>user to turn on-and-off data that's displayed in a chart (there's about
>> >>10
>> >>stats they could choose from, and it gets busy if all are shown).
>> >
>> > Pivot tables let you check and uncheck ranges. You may also be able to
>> > use
>> > the controls available in the Form Design toolbar, if you don't want to
>> > use a Pivot chart.

>>
>> For example:
>>
>> http://peltiertech.com/Excel/Charts/ChartByControl.html
>>
>> - Jon
>> -------
>> Jon Peltier, Microsoft Excel MVP
>> Tutorials and Custom Solutions
>> http://PeltierTech.com
>> _______
>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?QmVuV2ViZXI=?=
Guest
Posts: n/a
 
      24th May 2006
I really wanted to avoid changing the data for optimization perspective.

I did a record macro and changed the included fields. Looks like the
property i need to change is:

ActiveChart.PivotLayout.PivotTable.PivotFields("Sum of Unix").Orientation = _
xlHidden

Thanks,
-B

"Jon Peltier" wrote:

> In Excel you can use VBA to change the data used by individual series or by
> the entire chart. I don't know how charts work in Access.
>
> - Jon
> -------
> Jon Peltier, Microsoft Excel MVP
> Tutorials and Custom Solutions
> http://PeltierTech.com
> _______
>
>
> "BenWeber" <(E-Mail Removed)> wrote in message
> news:2A98A80B-2925-4B09-8A74-(E-Mail Removed)...
> > Both good answers.
> >
> > Problem for me is that i was trying to simplify the question. I'm
> > actually
> > using the chart outside of excel (it's actually in MS Access). That's why
> > i
> > tried to specify using VBA, although i did use "checkboxes on a
> > spreadsheet"
> > in the example because I thoguht it would be the same method so would be
> > simpler.
> >
> > Are there functions that allow you to change the data being displayed via
> > code?
> >
> > Ie methods to do what you'd do in the wizard if you took a value out of
> > the
> > stats being displayed in the data area of the chart?
> >
> > Thanks!
> > -B
> >
> > "Jon Peltier" wrote:
> >
> >>
> >> "Del Cotter" <(E-Mail Removed)> wrote in message
> >> news:g+(E-Mail Removed)...
> >> > On Tue, 23 May 2006, in microsoft.public.excel.charting,
> >> > BenWeber <(E-Mail Removed)> said:
> >> >
> >> >>Are there any vba functions to change the data displayed in the data
> >> >>area
> >> >>of
> >> >>the chart and/or legend text through VBA (ie not using the wizard,
> >> >>instead
> >> >>need to do this in code)?
> >> >>
> >> >>Specifically, I would like to put checkboxes on a worksheet to enable
> >> >>the
> >> >>user to turn on-and-off data that's displayed in a chart (there's about
> >> >>10
> >> >>stats they could choose from, and it gets busy if all are shown).
> >> >
> >> > Pivot tables let you check and uncheck ranges. You may also be able to
> >> > use
> >> > the controls available in the Form Design toolbar, if you don't want to
> >> > use a Pivot chart.
> >>
> >> For example:
> >>
> >> http://peltiertech.com/Excel/Charts/ChartByControl.html
> >>
> >> - Jon
> >> -------
> >> Jon Peltier, Microsoft Excel MVP
> >> Tutorials and Custom Solutions
> >> http://PeltierTech.com
> >> _______
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: changing displayed data on the fly in the detail section John Spencer Microsoft Access Reports 3 25th Nov 2008 08:55 PM
Legends - Changing the Shape of =?Utf-8?B?UGF1bA==?= Microsoft Excel Charting 2 4th Jan 2006 12:22 PM
Select query and changing displayed field data =?Utf-8?B?T2Zlcg==?= Microsoft Access 3 13th Jun 2005 11:01 PM
Changing data displayed in properties in explorer. The Old Timer Windows XP Help 1 21st Feb 2005 05:07 AM
Changing Legends labels? BobRoyAce Microsoft Access Reports 3 5th Jun 2004 06:03 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:51 AM.