Charts and VBA


Posted by Freedom on November 10, 2000 1:00 PM

Posted by Freedom on November 10, 2000 1:09 PM

I'm trying to create a macro that will take excisting data from my worksheet and create a specific chart and place it in a specific location.But every time I record and then play my macro back, my chart is just sitting in the middle of the page, half-way formatted.

Please HELP

Posted by marbel on November 10, 2000 3:58 PM


---------------------

Go into the VB editor and copy the macro script and paste it into a followup so we can see it. That's your only hope for help on this one, I think. You may also be able to read the problem yourself in there.
mb

Posted by Freedom on November 13, 2000 5:58 AM

:This is the macro script. I get a VB debug prompt in the area where I add the chart. Am I using the correct plotting info?
:Freedom


With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.64)
.RightMargin = Application.InchesToPoints(0.83)
.TopMargin = Application.InchesToPoints(0.54)
.BottomMargin = Application.InchesToPoints(1)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 300
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
End With
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = "&""Arial,Bold""Limited Warranty = number of ##/## Plans"
.CenterFooter = ""
.RightFooter = "&""Arial,Bold""GM Confidential" & Chr(10) & "eMRPxxx"
.LeftMargin = Application.InchesToPoints(0.64)
.RightMargin = Application.InchesToPoints(0.83)
.TopMargin = Application.InchesToPoints(0.54)
.BottomMargin = Application.InchesToPoints(1)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 300
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
End With
Rows("1:1").Select
Selection.RowHeight = 18.75
Rows("2:2").Select
Selection.RowHeight = 24
Rows("3:3").Select
Selection.RowHeight = 15.75
Rows("4:4").Select
Selection.RowHeight = 194.25
ActiveWindow.SmallScroll Down:=3
Rows("5:5").Select
Selection.RowHeight = 28.5
ActiveWindow.SmallScroll Down:=1
Rows("11:11").Select
Selection.RowHeight = 27
Rows("12:12").Select
Selection.Insert Shift:=xlDown
Selection.RowHeight = 194.25
ActiveWindow.SmallScroll Down:=-4
Range("D1").Select
Selection.Font.Bold = True
With Selection.Font
.Name = "Arial"
.Size = 16
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Range("D2").Select
Selection.Cut
Range("E2").Select
ActiveSheet.Paste
Selection.Font.Bold = True
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.ShrinkToFit = False
.MergeCells = False
End With
Range("D3").Select
Selection.Cut
Range("F3").Select
ActiveSheet.Paste
Selection.Font.Bold = True
With Selection.Font
.Name = "Arial"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.ShrinkToFit = False
.MergeCells = False
End With
Application.CommandBars("Drawing").Visible = True
ActiveSheet.Shapes.AddLine(2.25, 19.5, 478.5, 19.5).Select
Selection.ShapeRange.Line.Weight = 1.5
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.Style = msoLineSingle
Range("F3").Select
ActiveCell.FormulaR1C1 = " September, 2000"
Range("E2").Select
ActiveCell.FormulaR1C1 = "(Mileage in 1,000s)"
Range("F3").Select
With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.IndentLevel = 0
.ShrinkToFit = False
.MergeCells = False
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.ShrinkToFit = False
.MergeCells = False
End With
ActiveCell.FormulaR1C1 = " September, 2000"
Range("F3").Select
With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.IndentLevel = 0
.ShrinkToFit = False
.MergeCells = False
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.ShrinkToFit = False
.MergeCells = False
End With
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.ShrinkToFit = False
.MergeCells = False
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.ShrinkToFit = False
.MergeCells = False
End With
Selection.Cut
Range("E3").Select
ActiveSheet.Paste
With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.IndentLevel = 0
.ShrinkToFit = False
.MergeCells = False
End With
Application.CommandBars("Drawing").Visible = False
ActiveWindow.SmallScroll Down:=3
Columns("A:A").Select
Range("A4").Activate
Selection.ColumnWidth = 17
Columns("B:B").Select
Range("B4").Activate
Selection.ColumnWidth = 5.71
Columns("C:C").Select
Range("C4").Activate
Selection.ColumnWidth = 6.71
Columns("D:D").Select
Range("D4").Activate
Selection.ColumnWidth = 6.86
Columns("E:E").Select
Range("E4").Activate
Selection.ColumnWidth = 6.86
Columns("F:F").Select
Range("F4").Activate
Selection.ColumnWidth = 6.57
Columns("G:G").Select
Range("G4").Activate
Selection.ColumnWidth = 6.43
Columns("H:H").Select
Range("H4").Activate
Selection.ColumnWidth = 6.29
Columns("I:I").Select
Range("I4").Activate
Selection.ColumnWidth = 6.43
Columns("J:J").Select
Range("J4").Activate
Selection.ColumnWidth = 5.71
Columns("K:K").Select
Range("K4").Activate
Selection.ColumnWidth = 9
ActiveWindow.ScrollRow = 1
ActiveWindow.ScrollRow = 4
ActiveWindow.ScrollRow = 7
ActiveWindow.SmallScroll Down:=-3
Rows("5:5").Select
Selection.RowHeight = 12.75
Range("K4").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = True
.Orientation = 0
.ShrinkToFit = False
.MergeCells = False
End With
With Selection.Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
With Selection
.HorizontalAlignment = xlRight
.VerticalAlignment = xlBottom
.WrapText = True
.Orientation = 0
.ShrinkToFit = False
.MergeCells = False
End With
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Range("A5").Select
With Selection.Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 2
End With
With Selection.Interior
.ColorIndex = 10
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
Range("A6").Select
With Selection.Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 2
End With
With Selection.Interior
.ColorIndex = 25
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
Range("A5:A9").Select
With Selection.Font
.Name = "Arial"
.Size = 9
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
End With
Selection.Font.Bold = True
With Selection
.HorizontalAlignment = xlRight
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.ShrinkToFit = False
.MergeCells = False
End With
ActiveWindow.SmallScroll Down:=-1
Range("B5:B8").Select
ActiveWindow.SmallScroll Down:=1
Range("B5:K9").Select
With Selection.Font
.Name = "Arial"
.Size = 9
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Selection.Font.Bold = True
Range("B8:J9").Select
Selection.NumberFormat = "0.0%"
ActiveWindow.SmallScroll Down:=0
Range("K5").Select
ActiveCell.FormulaR1C1 = "=SUM(RC[-9]:RC[-1])"
Range("K6").Select
ActiveCell.FormulaR1C1 = "=SUM(RC[-9]:RC[-1])"
Range("K7").Select
ActiveCell.FormulaR1C1 = "=SUM(RC[-9]:RC[-1])"
Range("K8").Select
ActiveCell.FormulaR1C1 = "=R[-3]C/R[-1]C"
Range("K9").Select
ActiveWindow.SmallScroll Down:=-1
Range("K5:K7").Select
Selection.NumberFormat = "#,##0"
ActiveWindow.SmallScroll Down:=0
Range("A5:A9").Select
With Selection.Font
.Name = "Arial"
.Size = 8
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
End With
ActiveWindow.SmallScroll Down:=2
Range("D11").Select
Selection.Font.Bold = True
With Selection.Font
.Name = "Arial"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
ActiveWindow.SmallScroll Down:=5
ActiveWindow.ScrollRow = 13
ActiveWindow.SmallScroll Down:=0
Range("B13:K17").Select
With Selection.Font
.Name = "Arial"
.Size = 9
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Selection.Font.Bold = True
Range("A13:A17").Select
With Selection.Font
.Name = "Arial"
.Size = 8
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Selection.Font.Bold = True
With Selection
.HorizontalAlignment = xlRight
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.ShrinkToFit = False
.MergeCells = False
End With
Range("A13").Select
With Selection.Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 8
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 2
End With
With Selection.Interior
.ColorIndex = 10
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
Range("A14").Select
With Selection.Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 8
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 2
End With
With Selection.Interior
.ColorIndex = 25
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
Range("B16:J17").Select
Selection.NumberFormat = "0.0%"
Range("K13").Select
ActiveCell.FormulaR1C1 = "=SUM(RC[-9]:RC[-1])"
Range("K14").Select
ActiveCell.FormulaR1C1 = "=SUM(RC[-9]:RC[-1])"
Range("K15").Select
ActiveCell.FormulaR1C1 = "=SUM(RC[-9]:RC[-1])"
Range("K16").Select
ActiveCell.FormulaR1C1 = "=R[-3]C/R[-1]C"
Range("K17").Select
ActiveWindow.SmallScroll Down:=-12
ActiveSheet.Shapes("Line 1").Select
Selection.ShapeRange.Item("Line 1").Left = 2.25
Selection.ShapeRange.Item("Line 1").Width = 474.75
Charts.Add
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetSourceData Source:=Sheets("Freedom(2)").Range("B5:J6"), _
PlotBy:=xlRows
ActiveChart.SeriesCollection(1).XValues = "='Freedom (2)'!R4C2:R4C10"
ActiveChart.SeriesCollection(2).XValues = "='Freedom (2)'!R4C2:R4C10"
ActiveChart.Location Where:=xlLocationAsObject, Name:="Freedom (2)"
With ActiveChart
.HasTitle = False
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Total Plan Sales"
End With
ActiveChart.HasLegend = False
ActiveSheet.Shapes("Chart 2").IncrementLeft -24#
ActiveSheet.Shapes("Chart 2").IncrementTop -54.75
ActiveWindow.Visible = False
Charts.Add
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetSourceData Source:=Sheets("Freedom (2)").Range("B13:J14"), _
PlotBy:=xlRows
ActiveChart.SeriesCollection(1).XValues = "='Freedom (2)'!R4C2:R4C10"
ActiveChart.SeriesCollection(2).XValues = "='Freedom (2)'!R4C2:R4C10"
ActiveChart.Location Where:=xlLocationAsObject, Name:="emrp00409 (2)"
ActiveChart.HasLegend = False
ActiveSheet.Shapes("Chart 3").IncrementLeft -39.75
ActiveSheet.Shapes("Chart 3").IncrementTop 263.25
Windows("EMRP ACTUAL DATA.xls").SmallScroll Down:=-3
ActiveWindow.Visible = False
Windows("EMRP ACTUAL DATA.xls").Activate
Range("B4:J4").Select
With Selection.Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 2
End With
ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.ChartArea.Select
ActiveSheet.Shapes("Chart 2").ScaleWidth 1.41, msoFalse, _
msoScaleFromBottomRight
ActiveSheet.Shapes("Chart 2").IncrementLeft 4.5
ActiveSheet.Shapes("Chart 2").IncrementTop -15#
ActiveSheet.Shapes("Chart 2").ScaleHeight 1.32, msoFalse, msoScaleFromTopLeft
ActiveSheet.Shapes("Chart 2").ScaleWidth 1.05, msoFalse, msoScaleFromTopLeft
ActiveSheet.Shapes("Chart 2").ScaleWidth 1.01, msoFalse, _
msoScaleFromBottomRight
ActiveChart.Axes(xlValue).Select
With Selection.Border
.Weight = xlHairline
.LineStyle = xlAutomatic
End With
With Selection
.MajorTickMark = xlNone
.MinorTickMark = xlNone
.TickLabelPosition = xlNextToAxis
End With
Selection.TickLabels.AutoScaleFont = True
With Selection.TickLabels.Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 6
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.Background = xlAutomatic
End With
ActiveChart.Axes(xlCategory).Select
With Selection.Border
.Weight = xlHairline
.LineStyle = xlAutomatic
End With
With Selection
.MajorTickMark = xlNone
.MinorTickMark = xlNone
.TickLabelPosition = xlNextToAxis
End With
Selection.TickLabels.AutoScaleFont = True
With Selection.TickLabels.Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 6
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.Background = xlAutomatic
End With
ActiveChart.PlotArea.Select
Selection.Width = 324
Selection.Left = 90
ActiveChart.Axes(xlValue).AxisTitle.Select
Selection.Left = 12
Selection.Top = 36
Selection.AutoScaleFont = True
With Selection.Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.Background = xlAutomatic
End With
ActiveChart.PlotArea.Select
Selection.Left = 73
Selection.Width = 341
Selection.Top = 2
Selection.Height = 178
ActiveChart.Axes(xlCategory).Select
With Selection.Border
.Weight = 2
.LineStyle = 0
End With
Selection.Interior.ColorIndex = xlAutomatic
Sheets("Freedom (2)").DrawingObjects("Chart 2").RoundedCorners = False
Sheets("Freedom (2)").DrawingObjects("Chart 2").Shadow = False
ActiveChart.PlotArea.Select
With Selection.Border
.ColorIndex = 16
.Weight = xlThin
.LineStyle = xlContinuous
End With
With Selection.Interior
.ColorIndex = 2
.PatternColorIndex = 1
.Pattern = xlSolid
End With
ActiveChart.SeriesCollection(1).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlAutomatic
End With
Selection.Shadow = False
Selection.InvertIfNegative = False
With Selection.Interior
.ColorIndex = 25
.Pattern = xlSolid
End With
ActiveChart.SeriesCollection(2).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlAutomatic
End With
Selection.Shadow = False
Selection.InvertIfNegative = False
With Selection.Interior
.ColorIndex = 10
.Pattern = xlSolid
End With
Windows("EMRP ACTUAL DATA.xls").SmallScroll Down:=10
Windows("EMRP ACTUAL DATA.xls").LargeScroll Down:=-1
ActiveWindow.Visible = False
Windows("EMRP ACTUAL DATA.xls").Activate
ActiveSheet.ChartObjects("Chart 3").Activate
ActiveChart.ChartArea.Select
ActiveSheet.Shapes("Chart 3").ScaleHeight 1.19, msoFalse, msoScaleFromTopLeft
ActiveSheet.Shapes("Chart 3").ScaleWidth 1.35, msoFalse, _
msoScaleFromBottomRight
ActiveSheet.Shapes("Chart 3").ScaleWidth 1.11, msoFalse, msoScaleFromTopLeft
Windows("EMRP ACTUAL DATA.xls").SmallScroll Down:=-1
ActiveSheet.Shapes("Chart 3").ScaleHeight 1.12, msoFalse, _
msoScaleFromBottomRight
ActiveChart.PlotArea.Select
Selection.Width = 326
Selection.Left = 86
Windows("EMRP ACTUAL DATA.xls").SmallScroll Down:=1
ActiveChart.ChartArea.Select
ActiveChart.Axes(xlValue).Select
With Selection.Border
.Weight = xlHairline
.LineStyle = xlAutomatic
End With
With Selection
.MajorTickMark = xlNone
.MinorTickMark = xlNone
.TickLabelPosition = xlNextToAxis
End With
Selection.TickLabels.AutoScaleFont = True
With Selection.TickLabels.Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 6
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.Background = xlAutomatic
End With
ActiveChart.Axes(xlCategory).Select
With Selection.Border
.Weight = xlHairline
.LineStyle = xlAutomatic
End With
With Selection
.MajorTickMark = xlNone
.MinorTickMark = xlNone
.TickLabelPosition = xlNextToAxis
End With
Selection.TickLabels.AutoScaleFont = True
With Selection.TickLabels.Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 6
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.Background = xlAutomatic
End With
ActiveChart.ChartArea.Select
ActiveChart.PlotArea.Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlNone
End With
With Selection.Interior
.ColorIndex = 15
.PatternColorIndex = 1
.Pattern = xlSolid
End With
With Selection.Border
.Weight = xlHairline
.LineStyle = xlNone
End With
With Selection.Interior
.ColorIndex = 2
.PatternColorIndex = 1
.Pattern = xlSolid
End With
ActiveChart.SeriesCollection(1).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlAutomatic
End With
Selection.Shadow = False
Selection.InvertIfNegative = False
With Selection.Interior
.ColorIndex = 25
.Pattern = xlSolid
End With
ActiveChart.SeriesCollection(2).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlAutomatic
End With
Selection.Shadow = False
Selection.InvertIfNegative = False
With Selection.Interior
.ColorIndex = 10
.Pattern = xlSolid
End With
Windows("EMRP ACTUAL DATA.xls").SmallScroll Down:=-1
ActiveChart.ChartArea.Select
With ActiveChart
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Total Plan Sales"
End With
Selection.Left = 11
Selection.Top = 48
Selection.AutoScaleFont = True
With Selection.Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.Background = xlAutomatic
End With
Windows("EMRP ACTUAL DATA.xls").SmallScroll Down:=1
Selection.Left = 6
Selection.Top = 53
Windows("EMRP ACTUAL DATA.xls").SmallScroll Down:=1
ActiveWindow.Visible = False
Windows("EMRP ACTUAL DATA.xls").Activate
Range("K13:K15").Select
Selection.NumberFormat = "#,##0"
ActiveWindow.SmallScroll Down:=-12
Range("A1").Select
ActiveWindow.SelectedSheets.PrintPreview
ActiveWindow.SmallScroll Down:=5
ActiveSheet.ChartObjects("Chart 3").Activate
ActiveChart.PlotArea.Select
Selection.Left = 64
Selection.Width = 348
Windows("EMRP ACTUAL DATA.xls").SmallScroll Down:=6
ActiveChart.ChartArea.Select
With Selection.Border
.Weight = 2
.LineStyle = 0
End With
Selection.Interior.ColorIndex = xlAutomatic
Sheets("Freedom (2)").DrawingObjects("Chart 3").RoundedCorners = False
Sheets("Freedom (2)").DrawingObjects("Chart 3").Shadow = False
ActiveWindow.Visible = False
Windows("EMRP ACTUAL DATA.xls").Activate
Range("K12").Select
ActiveCell.FormulaR1C1 = "Mileage Total"
With ActiveCell.Characters(Start:=1, Length:=13).Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 9
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Range("K12").Select
With Selection
.HorizontalAlignment = xlRight
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.ShrinkToFit = False
.MergeCells = False
End With
With Selection
.HorizontalAlignment = xlRight
.VerticalAlignment = xlBottom
.WrapText = True
.Orientation = 0
.ShrinkToFit = False
.MergeCells = False
End With
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlEdgeRight).LineStyle = xlNone
ActiveWindow.SmallScroll Down:=-8
Range("K4").Select
With Selection.Font
.Name = "Arial"
.Size = 9
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
ActiveWindow.SmallScroll Down:=-3
Range("E3").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.ShrinkToFit = False
.MergeCells = False
End With
Selection.Merge
With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.IndentLevel = 0
.ShrinkToFit = False
.MergeCells = False
End With
Range("A1").Select
End Sub




Posted by Freedom on November 30, 2000 2:03 PM