Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.charting
|
|||
|
|||
![]()
Please help! I've just been moved to Excel 2007 and now find that the
wonderful macro below no longer works (the single chart version is still OK). I have files with 50 charts on a single worksheet (the data is on a separate tab) and I need to choose which rows to include rather than having an auto update. The files are accessed from multiple workstations so a macro saved in the workbook was ideal. Is there any way I can modify this code to get it working? Thanks in advance. Sub ChangeSeriesFormulaAllCharts() ''' Do all charts in sheet Dim oChart As ChartObject Dim OldString As String, NewString As String Dim mySrs As Series OldString = InputBox("Enter the string to be replaced:", "Enter old string") If Len(OldString) 1 Then NewString = InputBox("Enter the string to replace " & """" _ & OldString & """:", "Enter new string") For Each oChart In ActiveSheet.ChartObjects For Each mySrs In oChart.Chart.SeriesCollection mySrs.Formula = WorksheetFunction.Substitute(mySrs.Formula, OldString, NewString) Next Next Else MsgBox "Nothing to be replaced.", vbInformation, "Nothing Entered" End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
change series or line color in excel 2007 vba | Charts and Charting in Excel | |||
Macro trust center problems in Excel 2007 | Setting up and Configuration of Excel | |||
How do I change the legend Series order in Excel 2007? | Excel Discussion (Misc queries) | |||
How do I change the Series plotting order in Excel 2007? | Excel Discussion (Misc queries) | |||
Change chart type in single data series, Excel 2007 | Charts and Charting in Excel |