A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Charts and Charting
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

1 ChartSheet, 10 worksheets



 
 
Thread Tools Display Modes
  #1  
Old January 21st, 2005, 10:02 PM
Martin Wheeler
external usenet poster
 
Posts: n/a
Default 1 ChartSheet, 10 worksheets

xl 2000

I currently have 2 embedded charts on each of 10 wkshts ( R1 to R10). I have
my own toolbar that jumps to each chart with buttons G1 and G2.

I would like to have 1 chart sheet at the back of the book and when I press
G1 or G2 it will take me to the chart sheet and display the correct data for
the active sheet.

For instance, if I am on sheet R1 and I press G1 xl will jump to the chart
sheet and display the data in ='R1'!$T$7:$AB$7. This is the ref for one
line. The number of lines varies from one wkshts to the next and from day to
day(I have a wkbk for every day of the year). The range G1 uses is S6 to
AB30. This is constant across all the wkshts.

Any help would be greatly appreciated.
Ta,
Martin


  #2  
Old January 21st, 2005, 10:48 PM
Martin Wheeler
external usenet poster
 
Posts: n/a
Default

I have been tried the code below. But this refers to a button in the
worksheet. I would much prefer to use the buttons in my toolbar
Ta,
Martin
Private Sub CommandButton1_Click()
Chart1.Select
ActiveChart.SetSourceData Source:=Sheets("R1").Range("S6:AB30")
End Sub

"Martin Wheeler" wrote in message
...
xl 2000

I currently have 2 embedded charts on each of 10 wkshts ( R1 to R10). I

have
my own toolbar that jumps to each chart with buttons G1 and G2.

I would like to have 1 chart sheet at the back of the book and when I

press
G1 or G2 it will take me to the chart sheet and display the correct data

for
the active sheet.

For instance, if I am on sheet R1 and I press G1 xl will jump to the chart
sheet and display the data in ='R1'!$T$7:$AB$7. This is the ref for one
line. The number of lines varies from one wkshts to the next and from day

to
day(I have a wkbk for every day of the year). The range G1 uses is S6 to
AB30. This is constant across all the wkshts.

Any help would be greatly appreciated.
Ta,
Martin




  #3  
Old January 22nd, 2005, 01:53 AM
Jon Peltier
external usenet poster
 
Posts: n/a
Default

Martin -

The same code would work from a command bar button. Put the code into a regular code
module, not a worksheet class module.

Sub ActivateChart1()
Chart1.Select
ActiveChart.SetSourceData Source:=Sheets("R1").Range("S6:AB30")
End Sub

Add a button to an Excel command bar: Tools menu, Customize, Commands tab, scroll
down to Macros in the left, and drag the button on the right to the command bar.
Assign the macro: Tools menu, Customize, then right click on the button, choose
Assign Macro, and select your macro name from the list.

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

Martin Wheeler wrote:

I have been tried the code below. But this refers to a button in the
worksheet. I would much prefer to use the buttons in my toolbar
Ta,
Martin
Private Sub CommandButton1_Click()
Chart1.Select
ActiveChart.SetSourceData Source:=Sheets("R1").Range("S6:AB30")
End Sub

"Martin Wheeler" wrote in message
...

xl 2000

I currently have 2 embedded charts on each of 10 wkshts ( R1 to R10). I


have

my own toolbar that jumps to each chart with buttons G1 and G2.

I would like to have 1 chart sheet at the back of the book and when I


press

G1 or G2 it will take me to the chart sheet and display the correct data


for

the active sheet.

For instance, if I am on sheet R1 and I press G1 xl will jump to the chart
sheet and display the data in ='R1'!$T$7:$AB$7. This is the ref for one
line. The number of lines varies from one wkshts to the next and from day


to

day(I have a wkbk for every day of the year). The range G1 uses is S6 to
AB30. This is constant across all the wkshts.

Any help would be greatly appreciated.
Ta,
Martin






  #4  
Old January 22nd, 2005, 09:22 PM
Martin Wheeler
external usenet poster
 
Posts: n/a
Default

Hi Jon,
Thanks, I've tried it and it works.
Ta,
Martin


"Jon Peltier" wrote in message
...
Martin -

The same code would work from a command bar button. Put the code into a

regular code
module, not a worksheet class module.

Sub ActivateChart1()
Chart1.Select
ActiveChart.SetSourceData Source:=Sheets("R1").Range("S6:AB30")
End Sub

Add a button to an Excel command bar: Tools menu, Customize, Commands tab,

scroll
down to Macros in the left, and drag the button on the right to the

command bar.
Assign the macro: Tools menu, Customize, then right click on the button,

choose
Assign Macro, and select your macro name from the list.

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

Martin Wheeler wrote:

I have been tried the code below. But this refers to a button in the
worksheet. I would much prefer to use the buttons in my toolbar
Ta,
Martin
Private Sub CommandButton1_Click()
Chart1.Select
ActiveChart.SetSourceData Source:=Sheets("R1").Range("S6:AB30")
End Sub

"Martin Wheeler" wrote in message
...

xl 2000

I currently have 2 embedded charts on each of 10 wkshts ( R1 to R10). I


have

my own toolbar that jumps to each chart with buttons G1 and G2.

I would like to have 1 chart sheet at the back of the book and when I


press

G1 or G2 it will take me to the chart sheet and display the correct data


for

the active sheet.

For instance, if I am on sheet R1 and I press G1 xl will jump to the

chart
sheet and display the data in ='R1'!$T$7:$AB$7. This is the ref for one
line. The number of lines varies from one wkshts to the next and from

day

to

day(I have a wkbk for every day of the year). The range G1 uses is S6

to
AB30. This is constant across all the wkshts.

Any help would be greatly appreciated.
Ta,
Martin








 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Worksheets are referenced in expressions, how make the worksheets visible? Excel 2000 L Mehl General Discussion 2 July 27th, 2004 07:20 PM
data sheet to indie worksheets Dave R. Worksheet Functions 2 May 19th, 2004 06:11 PM
Copy a column into many worksheets in a workbook. Lisa Worksheet Functions 1 December 9th, 2003 08:13 PM
LOOKUP to various different worksheets David Worksheet Functions 2 November 13th, 2003 07:01 PM
Exporting multiple worksheets to one .CSV Alan Cocks Worksheet Functions 1 November 13th, 2003 10:56 AM


All times are GMT +1. The time now is 11:12 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.