E
Eric
Hello all,
Why oh why oh why can't I get this thing to work.
I have a macro to make a graph but everytime I go into the graph the series
colors and different line types that what I set previously. I have tried
working on this for 3 days and haven't gotten anywhere. Can you help me,
Please. Below is the macro I am using. I hope this help someone in helping
me. Thanks
Sub No8_Chart()
'
'Puts Proper Y-Scale Settings at bottom of graph page
'
Sheet7.unprotect "1dickson"
Sheet111.unprotect "1dickson"
Application.ScreenUpdating = False
If Sheets("test database").Range("A1") < 1 Then _
Application.ScreenUpdating = False
Sheets("Test Database").Select
Range("L27:L500").Select
Selection.Copy
Sheets("#8_chart").Select
Range("G16").Select
ActiveSheet.Paste
'
'QA Tests
'
' Sheets("QA_Verification").Select
' Range("P6205").Select
' Selection.Copy
' Sheets("#8_chart").Select
'Range("H16").Select
'ActiveSheet.Paste
'
'Verification Tests
'
' Sheets("QA_Verification").Select
' Range("Q6:Q205").Select
' Selection.Copy
' Sheets("#8_chart").Select
'Range("M16").Select
'ActiveSheet.Paste
'
'Moving Averages
'
Sheets("Moving Averages").Select
Range("I23:I500").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("#8_chart").Select
Range("H19").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range("F13").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Graph").Select
Range("J7").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Sheets("#8_chart").Select
Range("L7").Select
Selection.Copy
Sheets("Graph").Select
Range("J9").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
'
Range("J9").Select
Selection.NumberFormat = "0"
'
Sheets("ac_chart").Select
Range("T12").Select
Selection.Copy
Sheets("Graph").Select
Range("C43").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Sheets("ac_chart").Select
Range("U12").Select
Selection.Copy
Sheets("Graph").Select
Range("C44").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range("E45").Select
Application.CutCopyMode = False
'
'AC-Graphraws Graph
'
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.PlotArea.Select
ActiveChart.SetSourceData Source:=Sheets("#8_chart").Range("B15:J500"), _
PlotBy:=xlColumns
ActiveWindow.Visible = False
Range("A1").Select
ActiveSheet.DrawingObjects("Chart 1").Select
ActiveSheet.ChartObjects("Chart 1").Activate
With ActiveChart.Axes(xlValue)
.MinimumScale = 0.2
.MaximumScale = 2
.MinorUnitIsAuto = True
.MajorUnitIsAuto = True
.Crosses = xlAutomatic
.ReversePlotOrder = False
.ScaleType = False
End With
ActiveWindow.Visible = False
Range("A1").Select
'
ActiveSheet.DrawingObjects("Chart 1").Select
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.Axes(xlValue).Select
With ActiveChart.Axes(xlValue)
.MaximumScale = ActiveSheet.Range("C43")
.MinimumScale = ActiveSheet.Range("C44")
.MinorUnit = 1
.MajorUnit = 1
.Crosses = xlAutomatic
.ReversePlotOrder = False
.ScaleType = False
.TickLabels.NumberFormat = "0.0"
End With
Why oh why oh why can't I get this thing to work.
I have a macro to make a graph but everytime I go into the graph the series
colors and different line types that what I set previously. I have tried
working on this for 3 days and haven't gotten anywhere. Can you help me,
Please. Below is the macro I am using. I hope this help someone in helping
me. Thanks
Sub No8_Chart()
'
'Puts Proper Y-Scale Settings at bottom of graph page
'
Sheet7.unprotect "1dickson"
Sheet111.unprotect "1dickson"
Application.ScreenUpdating = False
If Sheets("test database").Range("A1") < 1 Then _
Application.ScreenUpdating = False
Sheets("Test Database").Select
Range("L27:L500").Select
Selection.Copy
Sheets("#8_chart").Select
Range("G16").Select
ActiveSheet.Paste
'
'QA Tests
'
' Sheets("QA_Verification").Select
' Range("P6205").Select
' Selection.Copy
' Sheets("#8_chart").Select
'Range("H16").Select
'ActiveSheet.Paste
'
'Verification Tests
'
' Sheets("QA_Verification").Select
' Range("Q6:Q205").Select
' Selection.Copy
' Sheets("#8_chart").Select
'Range("M16").Select
'ActiveSheet.Paste
'
'Moving Averages
'
Sheets("Moving Averages").Select
Range("I23:I500").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("#8_chart").Select
Range("H19").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range("F13").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Graph").Select
Range("J7").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Sheets("#8_chart").Select
Range("L7").Select
Selection.Copy
Sheets("Graph").Select
Range("J9").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
'
Range("J9").Select
Selection.NumberFormat = "0"
'
Sheets("ac_chart").Select
Range("T12").Select
Selection.Copy
Sheets("Graph").Select
Range("C43").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Sheets("ac_chart").Select
Range("U12").Select
Selection.Copy
Sheets("Graph").Select
Range("C44").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range("E45").Select
Application.CutCopyMode = False
'
'AC-Graphraws Graph
'
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.PlotArea.Select
ActiveChart.SetSourceData Source:=Sheets("#8_chart").Range("B15:J500"), _
PlotBy:=xlColumns
ActiveWindow.Visible = False
Range("A1").Select
ActiveSheet.DrawingObjects("Chart 1").Select
ActiveSheet.ChartObjects("Chart 1").Activate
With ActiveChart.Axes(xlValue)
.MinimumScale = 0.2
.MaximumScale = 2
.MinorUnitIsAuto = True
.MajorUnitIsAuto = True
.Crosses = xlAutomatic
.ReversePlotOrder = False
.ScaleType = False
End With
ActiveWindow.Visible = False
Range("A1").Select
'
ActiveSheet.DrawingObjects("Chart 1").Select
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.Axes(xlValue).Select
With ActiveChart.Axes(xlValue)
.MaximumScale = ActiveSheet.Range("C43")
.MinimumScale = ActiveSheet.Range("C44")
.MinorUnit = 1
.MajorUnit = 1
.Crosses = xlAutomatic
.ReversePlotOrder = False
.ScaleType = False
.TickLabels.NumberFormat = "0.0"
End With