Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The simplest answer would be .......
ActiveChart.SetSourceData Source:=myNewSheet.myF _ , PlotBy:=xlColumns but I suspect your range myF is not just the range for the chart data? If it is then all well and good. -- Cheers Nigel "cjsmith22" wrote in message ... cheers nigel - couple of problems though - i recorded a macro to set up a chart and i got the following code: Code: -------------------- Charts.Add ActiveChart.ChartType = xlColumnStacked ActiveChart.SetSourceData Source:=Sheets("Update 8").Range("O19:O38,A19:A38") _ , PlotBy:=xlColumns ActiveChart.Location Whe=xlLocationAsObject, Name:="Update 8" With ActiveChart .HasTitle = False .Axes(xlCategory, xlPrimary).HasTitle = False .Axes(xlValue, xlPrimary).HasTitle = False End With -------------------- As the name of the sheet will change every month (update 8 to update 9,10,11 etc) but it will always be the last sheet in the book, i set 'update 8' to the variable 'mynewSheet' ( Set mynewSheet = myWorkbook.Worksheets(sCount) ) *also* , the range from where the data is taken ("O19:O38,A19:A38") will also change every month so i set up the variable 'myF'(a range in mynewSheet) (the data will always be in columns O and A of 'myF') - how do i incorporate these two into SetSourceData ? -- cjsmith22 ------------------------------------------------------------------------ cjsmith22's Profile: http://www.excelforum.com/member.php...o&userid=28528 View this thread: http://www.excelforum.com/showthread...hreadid=484925 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Setting hover data labels to cells other than source data | Charts and Charting in Excel | |||
Setting hover data labels to cells other than source data | Excel Discussion (Misc queries) | |||
Setting source data range with Charts | Charts and Charting in Excel | |||
Setting Source Range For Chart | Excel Programming | |||
Setting Spreadsheet control data source to Excel file | Excel Programming |