Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2007

Tip: Looking for answers? Try searching our database.

Display different charts

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gary - 05 Jan 2007 13:19 GMT
Hi,

I'm not sure if what I'd like to do is possible, but hopefully someone
will be able to help me out.

I have an Excell 2003 workbook which contains various sheets. On one
sheet I have 3 charts that are derived from data in the other sheets.

I would like to give the user viewing the charts the option of viewing
chart1, chart2 or chart3 individually, or, if required, all at once.

I would like to do this with a drop down selction box that has the
options chart1, chart2, chart3 and Show All.

If chart1 was selected then the others would be hidden and so on.

Is this possible?

Thanks for any help.

Gary.
Jon Peltier - 05 Jan 2007 13:24 GMT
Try these examples:

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

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

> Hi,
>
[quoted text clipped - 17 lines]
>
> Gary.
Gary - 05 Jan 2007 15:41 GMT
Hi, thanks for your quick reply.

I don't really know much about all this and I'm not sure what's going
on from the downloaded example.

It is the second worksheet functionality I need. Why are there two list
boxes for the user to pick from?

And where is the code assigned to?

Thanks.

> Try these examples:
>
[quoted text clipped - 29 lines]
> >
> > Gary.
Jon Peltier - 05 Jan 2007 23:43 GMT
There are two types of listboxes, one from the Forms toolbar, the other from
the Controls Toolbox. They work similarly, and each has advantages.

Changing the controls toolbox listbox changes the value of cell A14 (named
CtrlTbxLink2) so it shows the selected value in the listbox. You can see
this if you show the Visual Basic toolbar, enter design mode (click on the
icon with the triangle and T-square) right click on the listbox, and choose
Properties. The name or address of the linked cell is shown in the
LinkedCell property. When this listbox is changed, it runs the
ListBox1_Change sub located on the Sheet2 code module (right click on the
Drop Down Chart 2 tab and choose View Code).

Changing the forms toolbar listbox changes the value of cell A21 (named
FrmTbrLink2), so it shows the index of the selected value. Right click on
the listbox and choose Format Control, click on the Control tab, and the
Cell Link box shows the name or address of the linked cell. Right click on
the listbox and choose Assign Macro to see which procedure runs when the
listbox is clicked. Click the Edit button in this dialog to see the
procedure.

In my code I've linked the two controls together, so they both always show
which chart is activated.

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

> Hi, thanks for your quick reply.
>
[quoted text clipped - 41 lines]
>> >
>> > Gary.
Gary - 10 Jan 2007 10:16 GMT
Thanks a lot. Very helpful.

> There are two types of listboxes, one from the Forms toolbar, the other from
> the Controls Toolbox. They work similarly, and each has advantages.
[quoted text clipped - 71 lines]
> >> >
> >> > Gary.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.