Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
chart sheet value (Y) axis scale data report - an example
Hello. No question here, just a procedure for the archive.
Returns value (Y) axis scale data (the max and min scales and major and minor units) for all charts sheets in active workbook. Sub ChartSheetScaleReport() 'Return all scales for all chart sheets in active workbook On Error Resume Next If ActiveWorkbook.Charts.Count = 0 Then MyVar = MsgBox("There are no chart sheets in this workbook") If MyVar = vbOK Then _ Exit Sub End If ActiveWorkbook.Worksheets.Add.Name = "ChartSheetScales" Sheets("ChartSheetScales").Select Range("A1").Select ActiveCell.Value = "Workbook Name" ActiveCell.Offset(0, 1).Value = "Chart Sheet Name" ActiveCell.Offset(0, 2).Value = "Min Scale" ActiveCell.Offset(0, 3).Value = "Max Scale" ActiveCell.Offset(0, 4).Value = "Major Unit" ActiveCell.Offset(0, 5).Value = "Minor Unit" Range("A2").Select For iChart = 1 To ActiveWorkbook.Charts.Count ActiveCell.Offset(iChart - 1, 0) = ActiveWorkbook.Name ActiveCell.Offset(iChart - 1, 1) = Charts(iChart).Name ActiveCell.Offset(iChart - 1, 2) = Charts(iChart).Axes(xlValue).MinimumScale ActiveCell.Offset(iChart - 1, 3) = Charts(iChart).Axes(xlValue).MaximumScale ActiveCell.Offset(iChart - 1, 4) = Charts(iChart).Axes(xlValue).MajorUnit ActiveCell.Offset(iChart - 1, 5) = Charts(iChart).Axes(xlValue).MinorUnit Next iChart Sheets("ChartSheetScales").Select Columns("A:F").EntireColumn.AutoFit End Sub Search criteria: get chart scales return chart scales get chart sheet scales return chart sheet scales extract chart sheet scales return chart maximum scale return chart minimum scale return major units return minor units extract chart sheet scale data extract chart sheet scale values |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to force chart axis to same scale | Excel Discussion (Misc queries) | |||
How to draw chart: log scale on X axis, natural scale on y axis? | Charts and Charting in Excel | |||
Time scale axis should be available in PivotChart Report. | Charts and Charting in Excel | |||
Time scale axis should be available in PivotChart Report. | Charts and Charting in Excel | |||
How do I scale the axis of a chart from external data so that dis. | Charts and Charting in Excel |