Hi bob, I know its small, though I would really like to make it into a simple callable sub, if for no reason other than to shorten the code.Originally Posted by xld
Basically the Sub that i was thinking of should be something like:
[vba]
Sub ChartModify(Chart_Workbook, Chartworksheet, Chartname, Chartseriestomodifyname, StringtoReplace, NewString)
' Need code here
End Sub[/vba]
That way I just call on one code, and all detaiuls for the chart to be modified are explicitly passed through - making it a very generalised routine, when looping through the worksheets.
Any ideas on how to write this.
The reason I ask this is because I had to go back in and modify this code for the chart references and scrolling through and ensureing I was adapting the right chart with the right range was very difficult - would be much easier to adapt a single line of a called Sub with relevant parameters, as above.
Not sure exactly what you mean here Bob. If you mean to have the function pass through Boolean values for each of the chart conditions (e.g. .MinimumScaleIsAuto, .MaximumScaleIsAuto), then yes that would be great to learn.Originally Posted by xld