cbetter
asked on
URGENT -- using Access 2003 (but be 2000 compatible) I need to run a macro created in an XLS file then import data into Access
I've tried using the example from "MillerDS on 10/21/2003 ". Â I created a macro in my Excel file and copied it into my Event Procedure on my cmd button, but I keep getting an error. Â I'm not really proficient in Access and this is URGENT that I get this working. Â Can anyone see what's wrong with my code? Â I receive a compile error, Method or data member not found @ line "xlApp.Workbooks.Open strFileName" and the file does exist in the "c:\" directory. Â (Sorry about the size of the code)
Private Sub ImprtMnthlySprdsht_DblClic k(Cancel As Integer)
 Â
  msg = "File c:\cad.xls is now importing......"
  Dim strFileName As String
  Dim xlApp As Application
  strFileName = ("C:\cad.xls")
  Set xlApp = New Application
  xlApp.Visible = True
  xlApp.Workbooks.Open strFileName
  xlApp.Cells.Select
  xlApp.Cells.EntireColumn.A utoFit
  With xlApp.Selection
    .HorizontalAlignment = xlCenter
    .VerticalAlignment = xlBottom
    .WrapText = False
    .Orientation = 0
    .AddIndent = False
    .ShrinkToFit = False
    .MergeCells = False
    End With
  xlApp.Rows("1:3").Select
  xlApp.Selection.Delete Shift:=xlUp
  xlApp.Range("A1").Select
  xlApp.Windows("Book1").Act ivate
  xlApp.Range("A3").Select
  xlApp.ActiveCell.FormulaR1 C1 = "sales"
  xlApp.Range("A4").Select
  xlApp.ActiveCell.FormulaR1 C1 = "order"
  xlApp.Range("A2").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("A2").Select
  xlApp.Range("A2").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Range("B5").Select
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("A3:A4").Selec t
  xlApp.Selection.ClearConte nts
  xlApp.Range("B6").Select
  xlApp.Windows("sfrt003_naw cad.xls"). Activate
  xlApp.Range("A1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("A1").Select
  xlApp.Selection.Copy
  xlApp.ActiveSheet.Paste
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("A2:A3").Selec t
  xlApp.Selection.ClearConte nts
  xlApp.Range("A12:A34").Sel ect
  xlApp.ActiveWindow.SmallSc roll ToRight:=1
  xlApp.ActiveWindow.SmallSc roll Down:=-1
  xlApp.Range("B2").Select
  xlApp.ActiveCell.FormulaR1 C1 = "PURCHASE-ORDER"
  xlApp.Range("B3").Select
  xlApp.ActiveCell.FormulaR1 C1 = "FUND-DOC"
  xlApp.Range("B1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("B1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("B2:B3").Selec t
  xlApp.Selection.ClearConte nts
  xlApp.Range("C2").Select
  xlApp.ActiveCell.FormulaR1 C1 = "FOB-PO "
  xlApp.Range("C1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("C1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("C2:C3").Selec t
  xlApp.Selection.ClearConte nts
  xlApp.Range("D2").Select
  xlApp.ActiveCell.FormulaR1 C1 = "WORK-COMP "
  xlApp.Range("D1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("D1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Range("D6").Select
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("D2:D3").Selec t
  xlApp.Selection.ClearConte nts
  xlApp.Range("C1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "FOB-PO-DATE"
  xlApp.Range("D1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "WORK-COMP-DATE"
  xlApp.Range("E2").Select
  xlApp.ActiveCell.FormulaR1 C1 = "BEG-"
  xlApp.Range("E1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("E1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("E2:E3").Selec t
  xlApp.Selection.ClearConte nts
  xlApp.xlApp.Columns("E:E") .ColumnWid th = 9.57
  xlApp.Range("E1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "BEG-FY"
  xlApp.Range("F2").Select
  xlApp.ActiveCell.FormulaR1 C1 = "END-"
  xlApp.Range("F1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("F1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("F2:F3").Selec t
  xlApp.Selection.ClearConte nts
  xlApp.Range("F1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "END-FY"
  xlApp.Range("G1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=R[2]C"
  xlApp.Range("G1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.ActiveSheet.Paste
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("G3").Select
  xlApp.Selection.ClearConte nts
  xlApp.Range("H1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=R[2]C"
  xlApp.Range("H1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("I1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=R[2]C"
  xlApp.Range("I1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("H3:I3").Selec t
  xlApp.Selection.ClearConte nts
  xlApp.Range("J2").Select
  xlApp.ActiveCell.FormulaR1 C1 = "PROGRAM-"
  xlApp.Range("J1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,R[2]C) "
  xlApp.Range("J1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("J2:J3").Selec t
  xlApp.Selection.ClearConte nts
  xlApp.xlApp.Columns("J:J") .EntireCol umn.AutoFi t
  xlApp.Range("K3").Select
  xlApp.ActiveCell.FormulaR1 C1 = "CASE-NO"
  xlApp.Range("K1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("K1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("K2:K3").Selec t
  xlApp.Selection.ClearConte nts
  xlApp.ActiveWindow.SmallSc roll ToRight:=9
  xlApp.Range("L3").Select
  xlApp.ActiveCell.FormulaR1 C1 = "WBS-ELEMENT"
  xlApp.Range("L1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("L1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("L2:L3").Selec t
  xlApp.Selection.ClearConte nts
  xlApp.Range("M1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=R[2]C"
  xlApp.Range("M1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("M3").Select
  xlApp.Selection.ClearConte nts
  xlApp.Range("N1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=R[2]C"
  xlApp.Range("N1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("N3").Select
  xlApp.Selection.ClearConte nts
  xlApp.Range("O1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("O1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("O2:O3").Selec t
  xlApp.Selection.ClearConte nts
  xlApp.ActiveWindow.SmallSc roll ToRight:=4
  xlApp.Range("O1").Select
  xlApp.Range("P1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("P1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("Q1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("S1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("P1:S1").Selec t
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("S1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "APPLICANT "
  xlApp.Range("R4").Select
  xlApp.xlApp.Columns("R:R") .EntireCol umn.AutoFi t
  xlApp.xlApp.Columns("R:R") .EntireCol umn.AutoFi t
  xlApp.xlApp.Columns("R:R") .ColumnWid th = 9.71
  xlApp.xlApp.Columns("Q:Q") .ColumnWid th = 14.86
  xlApp.xlApp.Columns("P:P") .ColumnWid th = 13.86
  xlApp.Range("R1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("R1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("T1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("T1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("U1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("U1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.ActiveWindow.SmallSc roll ToRight:=6
  xlApp.Range("V1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("V1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("W1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("W1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("X1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("X1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.ActiveSheet.Paste
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("Y1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("Y1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.ActiveCell.FormulaR1 C1 = "TOTAL-COMMITMENTS"
  xlApp.Range("Z1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("Z1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.ActiveCell.FormulaR1 C1 = "TOTAL-OBLIGATIONS"
  xlApp.Range("AA1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("AA2").Select
  xlApp.ActiveCell.FormulaR1 C1 = "TOTAL-ADJ "
  xlApp.Range("AA1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.ActiveCell.FormulaR1 C1 = "TOTAL-ADJ-COSTS"
  xlApp.Range("AB2").Select
  xlApp.ActiveCell.FormulaR1 C1 = "TOTAL-ADJ"
  xlApp.Range("AB1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("AB1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("AB1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("AC1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("AC1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Range("Y4").Select
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("AC1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "AVAILABLE-BALANCE"
  xlApp.Range("AE1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("AE1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("AF1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("AF1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("AG1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("AG1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("AH2").Select
  xlApp.ActiveCell.FormulaR1 C1 = "SALES-ORD"
  xlApp.Range("AH3").Select
  xlApp.ActiveCell.FormulaR1 C1 = "AUTH"
  xlApp.Range("AH1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("AH1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("AI1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=R[2]C"
  xlApp.Range("AI1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("AJ1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("AJ1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("AK1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=R[2]C"
  xlApp.Range("AK1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.ActiveWindow.SmallSc roll ToRight:=9
  xlApp.Range("AL1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=R[2]C"
  xlApp.Range("AL1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("AM3").Select
  xlApp.ActiveCell.FormulaR1 C1 = "IN-FY04"
  xlApp.Range("AM1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("AM1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("AN3").Select
  xlApp.ActiveCell.FormulaR1 C1 = "IN=FY04"
  xlApp.Range("AN1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("AN3").Select
  xlApp.ActiveCell.FormulaR1 C1 = "IN-FY04"
  xlApp.Range("AN1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("AO2").Select
  xlApp.ActiveCell.FormulaR1 C1 = "HRS-PERF"
  xlApp.Range("AO3").Select
  xlApp.ActiveCell.FormulaR1 C1 = "IN-FY04"
  xlApp.Range("AO1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("AO1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("AP3").Select
  xlApp.ActiveCell.FormulaR1 C1 = "IN-FY04"
  xlApp.Range("AP1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("AP1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("AQ3").Select
  xlApp.ActiveCell.FormulaR1 C1 = "IN=FY05"
  xlApp.Range("AQ3").Select
  xlApp.ActiveCell.FormulaR1 C1 = "IN-FY05"
  xlApp.Range("AQ1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("AQ1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("AR3").Select
  xlApp.ActiveCell.FormulaR1 C1 = "IN-FY05"
  xlApp.Range("AR1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("AR1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.ActiveWindow.SmallSc roll ToRight:=7
  xlApp.Range("AS3").Select
  xlApp.ActiveCell.FormulaR1 C1 = "IN-FY05"
  xlApp.Range("AS2").Select
  xlApp.ActiveCell.FormulaR1 C1 = "HRS-PERF"
  xlApp.Range("AS1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("AS1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("AT3").Select
  xlApp.ActiveCell.FormulaR1 C1 = "IN-FY05"
  xlApp.Range("AT1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("AT1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("AU3").Select
  xlApp.ActiveCell.FormulaR1 C1 = "IN-FY06"
  xlApp.Range("AU1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("AU1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("AV3").Select
  xlApp.ActiveCell.FormulaR1 C1 = "IN-FY06"
  xlApp.Range("AV1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("AV1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("AW1").Select
  xlApp.ActiveWindow.SmallSc roll ToRight:=4
  xlApp.Range("AX3").Select
  xlApp.ActiveCell.FormulaR1 C1 = "IN-FY06"
  xlApp.Range("AX1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("AX1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("AW3").Select
  xlApp.ActiveCell.FormulaR1 C1 = "IN-FY06"
  xlApp.Range("AW2").Select
  xlApp.ActiveCell.FormulaR1 C1 = "HRS-PERF"
  xlApp.Range("AW1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("AW1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.xlApp.Columns("AW:AW ").EntireC olumn.Auto Fit
  xlApp.xlApp.Columns("AX:AX ").EntireC olumn.Auto Fit
  xlApp.Range("AW2:AW3").Sel ect
  xlApp.Selection.ClearConte nts
  xlApp.Range("AX2:AX3").Sel ect
  xlApp.Selection.ClearConte nts
  xlApp.Range("AY3").Select
  xlApp.ActiveCell.FormulaR1 C1 = "DATE"
  xlApp.Range("AY2").Select
  xlApp.ActiveCell.FormulaR1 C1 = "CANC"
  xlApp.Range("AY1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("AY1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("AZ1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("AZ1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("BA1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=R[2]C"
  xlApp.Range("BA1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("BB1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("BB1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("BC2").Select
  xlApp.ActiveCell.FormulaR1 C1 = "CURR-PLAN"
  xlApp.Range("BB12").Select
  xlApp.ActiveWindow.SmallSc roll ToRight:=6
  xlApp.Range("BC1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C[-53] )"
  xlApp.Range("BC1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("BC1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("BC1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("BD3").Select
  xlApp.ActiveCell.FormulaR1 C1 = "PLAN-DUPES"
  xlApp.Range("BD1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("BD1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("BE2").Select
  xlApp.ActiveCell.FormulaR1 C1 = "OUTYR-PLAN"
  xlApp.Range("BE1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("BE1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("BF2").Select
  xlApp.ActiveCell.FormulaR1 C1 = "OUTYR-PLAN"
  xlApp.Range("BF1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("BF1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("BG1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("BG1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("BH1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("BH1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.ActiveWindow.SmallSc roll ToRight:=3
  xlApp.Range("BI1").Select
  xlApp.ActiveCell.FormulaR1 C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("BI1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci al Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Rows("2:3").Select
  xlApp.Range("BE2").Activat e
  xlApp.Selection.Delete Shift:=xlUp
  xlApp.ActiveWindow.ScrollC olumn = 56
  xlApp.ActiveWindow.ScrollC olumn = 55
  xlApp.ActiveWindow.ScrollC olumn = 54
  xlApp.ActiveWindow.ScrollC olumn = 52
  xlApp.ActiveWindow.ScrollC olumn = 51
  xlApp.ActiveWindow.ScrollC olumn = 49
  xlApp.ActiveWindow.ScrollC olumn = 47
  xlApp.ActiveWindow.ScrollC olumn = 44
  xlApp.ActiveWindow.ScrollC olumn = 42
  xlApp.ActiveWindow.ScrollC olumn = 40
  xlApp.ActiveWindow.ScrollC olumn = 37
  xlApp.ActiveWindow.ScrollC olumn = 35
  xlApp.ActiveWindow.ScrollC olumn = 33
  xlApp.ActiveWindow.ScrollC olumn = 31
  xlApp.ActiveWindow.ScrollC olumn = 29
  xlApp.ActiveWindow.ScrollC olumn = 28
  xlApp.ActiveWindow.ScrollC olumn = 27
  xlApp.ActiveWindow.ScrollC olumn = 26
  xlApp.ActiveWindow.ScrollC olumn = 25
  xlApp.ActiveWindow.ScrollC olumn = 24
  xlApp.ActiveWindow.ScrollC olumn = 23
  xlApp.ActiveWindow.ScrollC olumn = 22
  xlApp.ActiveWindow.ScrollC olumn = 21
  xlApp.ActiveWindow.ScrollC olumn = 20
  xlApp.ActiveWindow.ScrollC olumn = 19
  xlApp.ActiveWindow.ScrollC olumn = 18
  xlApp.ActiveWindow.ScrollC olumn = 17
  xlApp.ActiveWindow.ScrollC olumn = 16
  xlApp.ActiveWindow.ScrollC olumn = 15
  xlApp.ActiveWindow.ScrollC olumn = 14
  xlApp.ActiveWindow.ScrollC olumn = 13
  xlApp.ActiveWindow.ScrollC olumn = 12
  xlApp.ActiveWindow.ScrollC olumn = 11
  xlApp.ActiveWindow.ScrollC olumn = 10
  xlApp.ActiveWindow.ScrollC olumn = 9
  xlApp.ActiveWindow.ScrollC olumn = 8
  xlApp.ActiveWindow.ScrollC olumn = 7
  xlApp.ActiveWindow.ScrollC olumn = 6
  xlApp.ActiveWindow.ScrollC olumn = 5
  xlApp.ActiveWindow.ScrollC olumn = 4
  xlApp.Range("K34").Select
  xlApp.ActiveWindow.ScrollC olumn = 3
  xlApp.ActiveWindow.ScrollC olumn = 2
  xlApp.ActiveWindow.ScrollC olumn = 1
  Cells.Select
  xlApp.Selection.NumberForm at = "@"
  xlApp.Windows("Book1").Act ivate
  Workbooks.Open Filename:="C:\B9\TEST4_sfr t003_nawca d_WK7_fy06 23 Nov 05.xls"
  xlApp.ActiveWindow.LargeSc roll Down:=-1
  xlApp.ActiveWindow.ScrollR ow = 7062
  xlApp.ActiveWindow.ScrollR ow = 7022
  xlApp.ActiveWindow.ScrollR ow = 6970
  xlApp.ActiveWindow.ScrollR ow = 6865
  xlApp.ActiveWindow.ScrollR ow = 6761
  xlApp.ActiveWindow.ScrollR ow = 6630
  xlApp.ActiveWindow.ScrollR ow = 6447
  xlApp.ActiveWindow.ScrollR ow = 6225
  xlApp.ActiveWindow.ScrollR ow = 5950
  xlApp.ActiveWindow.ScrollR ow = 5649
  xlApp.ActiveWindow.ScrollR ow = 5362
  xlApp.ActiveWindow.ScrollR ow = 5022
  xlApp.ActiveWindow.ScrollR ow = 4669
  xlApp.ActiveWindow.ScrollR ow = 4512
  xlApp.ActiveWindow.ScrollR ow = 4185
  xlApp.ActiveWindow.ScrollR ow = 3845
  xlApp.ActiveWindow.ScrollR ow = 3688
  xlApp.ActiveWindow.ScrollR ow = 3401
  xlApp.ActiveWindow.ScrollR ow = 3100
  xlApp.ActiveWindow.ScrollR ow = 2668
  xlApp.ActiveWindow.ScrollR ow = 2381
  xlApp.ActiveWindow.ScrollR ow = 2237
  xlApp.ActiveWindow.ScrollR ow = 1988
  xlApp.ActiveWindow.ScrollR ow = 1753
  xlApp.ActiveWindow.ScrollR ow = 1557
  xlApp.ActiveWindow.ScrollR ow = 1361
  xlApp.ActiveWindow.ScrollR ow = 1178
  xlApp.ActiveWindow.ScrollR ow = 1034
  xlApp.ActiveWindow.ScrollR ow = 903
  xlApp.ActiveWindow.ScrollR ow = 825
  xlApp.ActiveWindow.ScrollR ow = 759
  xlApp.ActiveWindow.ScrollR ow = 733
  xlApp.ActiveWindow.ScrollR ow = 720
  xlApp.ActiveWindow.ScrollR ow = 681
  xlApp.ActiveWindow.ScrollR ow = 629
  xlApp.ActiveWindow.ScrollR ow = 576
  xlApp.ActiveWindow.ScrollR ow = 511
  xlApp.ActiveWindow.ScrollR ow = 432
  xlApp.ActiveWindow.ScrollR ow = 354
  xlApp.ActiveWindow.ScrollR ow = 328
  xlApp.ActiveWindow.ScrollR ow = 302
  xlApp.ActiveWindow.ScrollR ow = 276
  xlApp.ActiveWindow.ScrollR ow = 171
  xlApp.ActiveWindow.ScrollR ow = 119
  xlApp.ActiveWindow.ScrollR ow = 79
  xlApp.ActiveWindow.ScrollR ow = 53
  xlApp.Windows("sfrt003_naw cad.xls"). Activate
  xlApp.Selection.Replace What:="", Replacement:="""""", LookAt:=xlPart, _
    SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
    ReplaceFormat:=False
  xlApp.ActiveWindow.ScrollR ow = 40
  xlApp.ActiveWindow.ScrollR ow = 119
  xlApp.ActiveWindow.ScrollR ow = 236
  xlApp.ActiveWindow.ScrollR ow = 406
  xlApp.ActiveWindow.ScrollR ow = 668
  xlApp.ActiveWindow.ScrollR ow = 969
  xlApp.ActiveWindow.ScrollR ow = 1296
  xlApp.ActiveWindow.ScrollR ow = 1584
  xlApp.ActiveWindow.ScrollR ow = 1819
  xlApp.ActiveWindow.ScrollR ow = 2028
  xlApp.ActiveWindow.ScrollR ow = 2224
  xlApp.ActiveWindow.ScrollR ow = 2421
  xlApp.ActiveWindow.ScrollR ow = 2669
  xlApp.ActiveWindow.ScrollR ow = 2996
  xlApp.ActiveWindow.ScrollR ow = 3310
  xlApp.ActiveWindow.ScrollR ow = 3572
  xlApp.ActiveWindow.ScrollR ow = 3794
  xlApp.ActiveWindow.ScrollR ow = 3977
  xlApp.ActiveWindow.ScrollR ow = 4147
  xlApp.ActiveWindow.ScrollR ow = 4343
  xlApp.ActiveWindow.ScrollR ow = 4579
  xlApp.ActiveWindow.ScrollR ow = 4827
  xlApp.ActiveWindow.ScrollR ow = 5063
  xlApp.ActiveWindow.ScrollR ow = 5311
  xlApp.ActiveWindow.ScrollR ow = 5507
  xlApp.ActiveWindow.ScrollR ow = 5625
  xlApp.ActiveWindow.ScrollR ow = 5677
  xlApp.ActiveWindow.ScrollR ow = 5730
  xlApp.ActiveWindow.ScrollR ow = 5808
  xlApp.ActiveWindow.ScrollR ow = 5873
  xlApp.ActiveWindow.ScrollR ow = 5913
  xlApp.ActiveWindow.ScrollR ow = 5952
  xlApp.ActiveWindow.ScrollR ow = 5965
  xlApp.ActiveWindow.ScrollR ow = 5991
  xlApp.ActiveWindow.ScrollR ow = 6017
  xlApp.ActiveWindow.ScrollR ow = 6030
  xlApp.ActiveWindow.ScrollR ow = 6070
  xlApp.ActiveWindow.ScrollR ow = 6122
  xlApp.ActiveWindow.ScrollR ow = 6148
  xlApp.ActiveWindow.ScrollR ow = 6213
  xlApp.ActiveWindow.ScrollR ow = 6318
  xlApp.ActiveWindow.ScrollR ow = 6397
  xlApp.ActiveWindow.ScrollR ow = 6501
  xlApp.ActiveWindow.ScrollR ow = 6593
  xlApp.ActiveWindow.ScrollR ow = 6645
  xlApp.ActiveWindow.ScrollR ow = 6763
  xlApp.ActiveWindow.ScrollR ow = 6867
  xlApp.ActiveWindow.ScrollR ow = 6946
  xlApp.ActiveWindow.ScrollR ow = 7011
  xlApp.ActiveWindow.ScrollR ow = 7064
  xlApp.ActiveWindow.ScrollR ow = 7129
  xlApp.ActiveWindow.ScrollC olumn = 2
  xlApp.ActiveWindow.ScrollC olumn = 3
  xlApp.ActiveWindow.ScrollC olumn = 4
  xlApp.ActiveWindow.ScrollC olumn = 5
  xlApp.ActiveWindow.ScrollC olumn = 6
  xlApp.ActiveWindow.ScrollC olumn = 8
  xlApp.ActiveWindow.ScrollC olumn = 10
  xlApp.ActiveWindow.ScrollC olumn = 12
  xlApp.ActiveWindow.ScrollC olumn = 14
  xlApp.ActiveWindow.ScrollC olumn = 16
  xlApp.ActiveWindow.ScrollC olumn = 19
  xlApp.ActiveWindow.ScrollC olumn = 21
  xlApp.ActiveWindow.ScrollC olumn = 23
  xlApp.ActiveWindow.ScrollC olumn = 26
  xlApp.ActiveWindow.ScrollC olumn = 28
  xlApp.ActiveWindow.ScrollC olumn = 30
  xlApp.ActiveWindow.ScrollC olumn = 32
  xlApp.ActiveWindow.ScrollC olumn = 35
  xlApp.ActiveWindow.ScrollC olumn = 37
  xlApp.ActiveWindow.ScrollC olumn = 38
  xlApp.ActiveWindow.ScrollC olumn = 39
  xlApp.ActiveWindow.ScrollC olumn = 41
  xlApp.ActiveWindow.ScrollC olumn = 43
  xlApp.ActiveWindow.ScrollC olumn = 44
  xlApp.ActiveWindow.ScrollC olumn = 46
  xlApp.ActiveWindow.ScrollC olumn = 47
  xlApp.ActiveWindow.ScrollC olumn = 49
  xlApp.ActiveWindow.ScrollC olumn = 50
  xlApp.ActiveWindow.ScrollC olumn = 51
  xlApp.ActiveWindow.ScrollC olumn = 53
  xlApp.ActiveWindow.ScrollC olumn = 54
  xlApp.ActiveWindow.ScrollC olumn = 56
  xlApp.ActiveWindow.ScrollC olumn = 57
  xlApp.ActiveWindow.ScrollC olumn = 58
  xlApp.ActiveWindow.ScrollC olumn = 59
  xlApp.ActiveWindow.ScrollC olumn = 61
  xlApp.ActiveWindow.ScrollC olumn = 62
  xlApp.ActiveWindow.ScrollC olumn = 1
  xlApp.ActiveWindow.ScrollC olumn = 62
  xlApp.Windows("TEST4_sfrt0 03_nawcad_ WK7_fy06 23 Nov 05.xls").Activate
  xlApp.ActiveWindow.ScrollR ow = 79
  xlApp.ActiveWindow.ScrollR ow = 158
  xlApp.ActiveWindow.ScrollR ow = 289
  xlApp.ActiveWindow.ScrollR ow = 432
  xlApp.ActiveWindow.ScrollR ow = 602
  xlApp.ActiveWindow.ScrollR ow = 825
  xlApp.ActiveWindow.ScrollR ow = 1099
  xlApp.ActiveWindow.ScrollR ow = 1361
  xlApp.ActiveWindow.ScrollR ow = 1583
  xlApp.ActiveWindow.ScrollR ow = 1792
  xlApp.ActiveWindow.ScrollR ow = 1988
  xlApp.ActiveWindow.ScrollR ow = 2185
  xlApp.ActiveWindow.ScrollR ow = 2341
  xlApp.ActiveWindow.ScrollR ow = 2485
  xlApp.ActiveWindow.ScrollR ow = 2603
  xlApp.ActiveWindow.ScrollR ow = 2694
  xlApp.ActiveWindow.ScrollR ow = 2786
  xlApp.ActiveWindow.ScrollR ow = 2904
  xlApp.ActiveWindow.ScrollR ow = 3034
  xlApp.ActiveWindow.ScrollR ow = 3152
  xlApp.ActiveWindow.ScrollR ow = 3270
  xlApp.ActiveWindow.ScrollR ow = 3361
  xlApp.ActiveWindow.ScrollR ow = 3453
  xlApp.ActiveWindow.ScrollR ow = 3531
  xlApp.ActiveWindow.ScrollR ow = 3597
  xlApp.ActiveWindow.ScrollR ow = 3662
  xlApp.ActiveWindow.ScrollR ow = 3727
  xlApp.ActiveWindow.ScrollR ow = 3780
  xlApp.ActiveWindow.ScrollR ow = 3806
  xlApp.ActiveWindow.ScrollR ow = 3845
  xlApp.ActiveWindow.ScrollR ow = 3858
  xlApp.ActiveWindow.ScrollR ow = 3963
  xlApp.ActiveWindow.ScrollR ow = 4316
  xlApp.ActiveWindow.ScrollR ow = 4643
  xlApp.ActiveWindow.ScrollR ow = 4996
  xlApp.ActiveWindow.ScrollR ow = 5323
  xlApp.ActiveWindow.ScrollR ow = 5636
  xlApp.ActiveWindow.ScrollR ow = 5937
  xlApp.ActiveWindow.ScrollR ow = 6264
  xlApp.ActiveWindow.ScrollR ow = 6578
  xlApp.ActiveWindow.ScrollR ow = 6852
  xlApp.ActiveWindow.ScrollR ow = 7049
  xlApp.ActiveWindow.ScrollR ow = 7127
  xlApp.ActiveWindow.ScrollR ow = 53
  xlApp.ActiveWindow.ScrollR ow = 7127
  xlApp.ActiveWindow.ScrollC olumn = 2
  xlApp.ActiveWindow.ScrollC olumn = 3
  xlApp.ActiveWindow.ScrollC olumn = 4
  xlApp.ActiveWindow.ScrollC olumn = 5
  xlApp.ActiveWindow.ScrollC olumn = 6
  xlApp.ActiveWindow.ScrollC olumn = 7
  xlApp.ActiveWindow.ScrollC olumn = 9
  xlApp.ActiveWindow.ScrollC olumn = 10
  xlApp.ActiveWindow.ScrollC olumn = 11
  xlApp.ActiveWindow.ScrollC olumn = 12
  xlApp.ActiveWindow.ScrollC olumn = 14
  xlApp.ActiveWindow.ScrollC olumn = 15
  xlApp.ActiveWindow.ScrollC olumn = 16
  xlApp.ActiveWindow.ScrollC olumn = 17
  xlApp.ActiveWindow.ScrollC olumn = 18
  xlApp.ActiveWindow.ScrollC olumn = 19
  xlApp.ActiveWindow.ScrollC olumn = 20
  xlApp.ActiveWindow.ScrollC olumn = 21
  xlApp.ActiveWindow.ScrollC olumn = 22
  xlApp.ActiveWindow.ScrollC olumn = 24
  xlApp.ActiveWindow.ScrollC olumn = 25
  xlApp.ActiveWindow.ScrollC olumn = 26
  xlApp.ActiveWindow.ScrollC olumn = 28
  xlApp.ActiveWindow.ScrollC olumn = 29
  xlApp.ActiveWindow.ScrollC olumn = 31
  xlApp.ActiveWindow.ScrollC olumn = 32
  xlApp.ActiveWindow.ScrollC olumn = 34
  xlApp.ActiveWindow.ScrollC olumn = 36
  xlApp.ActiveWindow.ScrollC olumn = 37
  xlApp.ActiveWindow.ScrollC olumn = 38
  xlApp.ActiveWindow.ScrollC olumn = 39
  xlApp.ActiveWindow.ScrollC olumn = 40
  xlApp.ActiveWindow.ScrollC olumn = 41
  xlApp.ActiveWindow.ScrollC olumn = 42
  xlApp.ActiveWindow.ScrollC olumn = 43
  xlApp.ActiveWindow.ScrollC olumn = 44
  xlApp.ActiveWindow.ScrollC olumn = 45
  xlApp.ActiveWindow.ScrollC olumn = 46
  xlApp.ActiveWindow.ScrollC olumn = 47
  xlApp.ActiveWindow.ScrollC olumn = 48
  xlApp.ActiveWindow.ScrollC olumn = 49
  xlApp.ActiveWindow.ScrollC olumn = 50
  xlApp.ActiveWindow.ScrollC olumn = 51
  xlApp.ActiveWindow.ScrollC olumn = 53
  xlApp.ActiveWindow.ScrollC olumn = 54
  xlApp.ActiveWindow.ScrollC olumn = 55
  xlApp.ActiveWindow.ScrollC olumn = 56
  xlApp.ActiveWindow.ScrollC olumn = 57
  xlApp.ActiveWindow.ScrollC olumn = 58
  xlApp.ActiveWindow.ScrollC olumn = 59
  xlApp.ActiveWindow.ScrollC olumn = 60
  xlApp.ActiveWindow.ScrollC olumn = 59
  xlApp.ActiveWindow.ScrollC olumn = 58
  xlApp.ActiveWindow.ScrollC olumn = 57
  xlApp.ActiveWindow.ScrollC olumn = 56
  xlApp.ActiveWindow.ScrollC olumn = 57
  xlApp.ActiveWindow.ScrollC olumn = 58
  xlApp.ActiveWindow.ScrollC olumn = 59
  xlApp.ActiveWindow.ScrollC olumn = 60
  xlApp.ActiveWindow.ScrollC olumn = 61
  xlApp.ActiveWindow.ScrollC olumn = 62
  xlApp.ActiveWindow.ScrollC olumn = 1
  xlApp.ActiveWindow.ScrollC olumn = 62
  xlApp.ActiveWindow.ScrollC olumn = 60
  xlApp.ActiveWindow.ScrollC olumn = 59
  xlApp.ActiveWindow.ScrollC olumn = 60
  xlApp.ActiveWindow.ScrollC olumn = 61
  xlApp.ActiveWindow.ScrollC olumn = 62
  xlApp.ActiveWindow.SmallSc roll ToRight:=-1
  xlApp.ActiveWindow.ScrollR ow = 7088
  xlApp.ActiveWindow.ScrollR ow = 7062
  xlApp.ActiveWindow.ScrollR ow = 7035
  xlApp.ActiveWindow.ScrollR ow = 6996
  xlApp.ActiveWindow.ScrollR ow = 6970
  xlApp.ActiveWindow.ScrollR ow = 6944
  xlApp.ActiveWindow.ScrollR ow = 6905
  xlApp.ActiveWindow.ScrollR ow = 6879
  xlApp.ActiveWindow.ScrollR ow = 6852
  xlApp.ActiveWindow.ScrollR ow = 6813
  xlApp.ActiveWindow.ScrollR ow = 6800
  xlApp.ActiveWindow.ScrollR ow = 6787
  xlApp.ActiveWindow.ScrollR ow = 6761
  xlApp.ActiveWindow.ScrollR ow = 6748
  xlApp.ActiveWindow.ScrollR ow = 6709
  xlApp.ActiveWindow.ScrollR ow = 6669
  xlApp.ActiveWindow.ScrollR ow = 6630
  xlApp.ActiveWindow.ScrollR ow = 6591
  xlApp.ActiveWindow.ScrollR ow = 6578
  xlApp.ActiveWindow.ScrollR ow = 6512
  xlApp.ActiveWindow.ScrollR ow = 6473
  xlApp.ActiveWindow.ScrollR ow = 6421
  xlApp.ActiveWindow.ScrollR ow = 6356
  xlApp.ActiveWindow.ScrollR ow = 6303
  xlApp.ActiveWindow.ScrollR ow = 6251
  xlApp.ActiveWindow.ScrollR ow = 6225
  xlApp.ActiveWindow.ScrollR ow = 6199
  xlApp.ActiveWindow.ScrollR ow = 6186
  xlApp.ActiveWindow.ScrollR ow = 6146
  xlApp.ActiveWindow.ScrollR ow = 6120
  xlApp.ActiveWindow.ScrollR ow = 6068
  xlApp.ActiveWindow.ScrollR ow = 6055
  xlApp.ActiveWindow.ScrollR ow = 6003
  xlApp.ActiveWindow.ScrollR ow = 5950
  xlApp.ActiveWindow.ScrollR ow = 5898
  xlApp.ActiveWindow.ScrollR ow = 5833
  xlApp.ActiveWindow.ScrollR ow = 5793
  xlApp.ActiveWindow.ScrollR ow = 5741
  xlApp.ActiveWindow.ScrollR ow = 5676
  xlApp.ActiveWindow.ScrollR ow = 5610
  xlApp.ActiveWindow.ScrollR ow = 5558
  xlApp.ActiveWindow.ScrollR ow = 5493
  xlApp.ActiveWindow.ScrollR ow = 5427
  xlApp.ActiveWindow.ScrollR ow = 5362
  xlApp.ActiveWindow.ScrollR ow = 5296
  xlApp.ActiveWindow.ScrollR ow = 5231
  xlApp.ActiveWindow.ScrollR ow = 5166
  xlApp.ActiveWindow.ScrollR ow = 5113
  xlApp.ActiveWindow.ScrollR ow = 5048
  xlApp.ActiveWindow.ScrollR ow = 5009
  xlApp.ActiveWindow.ScrollR ow = 4930
  xlApp.ActiveWindow.ScrollR ow = 4839
  xlApp.ActiveWindow.ScrollR ow = 4773
  xlApp.ActiveWindow.ScrollR ow = 4695
  xlApp.ActiveWindow.ScrollR ow = 4617
  xlApp.ActiveWindow.ScrollR ow = 4538
  xlApp.ActiveWindow.ScrollR ow = 4473
  xlApp.ActiveWindow.ScrollR ow = 4381
  xlApp.ActiveWindow.ScrollR ow = 4277
  xlApp.ActiveWindow.ScrollR ow = 4159
  xlApp.ActiveWindow.ScrollR ow = 4028
  xlApp.ActiveWindow.ScrollR ow = 3845
  xlApp.ActiveWindow.ScrollR ow = 3662
  xlApp.ActiveWindow.ScrollR ow = 3492
  xlApp.ActiveWindow.ScrollR ow = 3296
  xlApp.ActiveWindow.ScrollR ow = 3126
  xlApp.ActiveWindow.ScrollR ow = 2956
  xlApp.ActiveWindow.ScrollR ow = 2812
  xlApp.ActiveWindow.ScrollR ow = 2681
  xlApp.ActiveWindow.ScrollR ow = 2551
  xlApp.ActiveWindow.ScrollR ow = 2420
  xlApp.ActiveWindow.ScrollR ow = 2289
  xlApp.ActiveWindow.ScrollR ow = 2158
  xlApp.ActiveWindow.ScrollR ow = 2054
  xlApp.ActiveWindow.ScrollR ow = 1936
  xlApp.ActiveWindow.ScrollR ow = 1832
  xlApp.ActiveWindow.ScrollR ow = 1714
  xlApp.ActiveWindow.ScrollR ow = 1635
  xlApp.ActiveWindow.ScrollR ow = 1544
  xlApp.ActiveWindow.ScrollR ow = 1465
  xlApp.ActiveWindow.ScrollR ow = 1374
  xlApp.ActiveWindow.ScrollR ow = 1295
  xlApp.ActiveWindow.ScrollR ow = 1217
  xlApp.ActiveWindow.ScrollR ow = 1152
  xlApp.ActiveWindow.ScrollR ow = 1086
  xlApp.ActiveWindow.ScrollR ow = 1034
  xlApp.ActiveWindow.ScrollR ow = 982
  xlApp.ActiveWindow.ScrollR ow = 942
  xlApp.ActiveWindow.ScrollR ow = 890
  xlApp.ActiveWindow.ScrollR ow = 851
  xlApp.ActiveWindow.ScrollR ow = 812
  xlApp.ActiveWindow.ScrollR ow = 772
  xlApp.ActiveWindow.ScrollR ow = 733
  xlApp.ActiveWindow.ScrollR ow = 681
  xlApp.ActiveWindow.ScrollR ow = 655
  xlApp.ActiveWindow.ScrollR ow = 629
  xlApp.ActiveWindow.ScrollR ow = 589
  xlApp.ActiveWindow.ScrollR ow = 550
  xlApp.ActiveWindow.ScrollR ow = 524
  xlApp.ActiveWindow.ScrollR ow = 472
  xlApp.ActiveWindow.ScrollR ow = 432
  xlApp.ActiveWindow.ScrollR ow = 406
  xlApp.ActiveWindow.ScrollR ow = 354
  xlApp.ActiveWindow.ScrollR ow = 315
  xlApp.ActiveWindow.ScrollR ow = 302
  xlApp.ActiveWindow.ScrollR ow = 263
  xlApp.ActiveWindow.ScrollR ow = 236
  xlApp.ActiveWindow.ScrollR ow = 210
  xlApp.ActiveWindow.ScrollR ow = 197
  xlApp.ActiveWindow.ScrollR ow = 184
  xlApp.ActiveWindow.ScrollR ow = 171
  xlApp.ActiveWindow.ScrollR ow = 158
  xlApp.ActiveWindow.ScrollR ow = 119
  xlApp.ActiveWindow.ScrollR ow = 106
  xlApp.ActiveWindow.ScrollR ow = 93
  xlApp.ActiveWindow.ScrollR ow = 79
  xlApp.ActiveWindow.ScrollR ow = 66
  xlApp.ActiveWindow.ScrollR ow = 40
  xlApp.ActiveWindow.ScrollR ow = 27
  xlApp.ActiveWindow.ScrollR ow = 14
  xlApp.ActiveWindow.ScrollR ow = 1
  xlApp.Windows("sfrt003_naw cad.xls"). Activate
  xlApp.ActiveWindow.ScrollC olumn = 61
  xlApp.ActiveWindow.ScrollC olumn = 59
  xlApp.ActiveWindow.ScrollC olumn = 56
  xlApp.ActiveWindow.ScrollC olumn = 52
  xlApp.ActiveWindow.ScrollC olumn = 50
  xlApp.ActiveWindow.ScrollC olumn = 47
  xlApp.ActiveWindow.ScrollC olumn = 45
  xlApp.ActiveWindow.ScrollC olumn = 42
  xlApp.ActiveWindow.ScrollC olumn = 39
  xlApp.ActiveWindow.ScrollC olumn = 36
  xlApp.ActiveWindow.ScrollC olumn = 35
  xlApp.ActiveWindow.ScrollC olumn = 34
  xlApp.ActiveWindow.ScrollC olumn = 33
  xlApp.ActiveWindow.ScrollC olumn = 32
  xlApp.ActiveWindow.ScrollC olumn = 31
  xlApp.ActiveWindow.ScrollC olumn = 30
  xlApp.ActiveWindow.ScrollC olumn = 28
  xlApp.ActiveWindow.ScrollC olumn = 25
  xlApp.ActiveWindow.ScrollC olumn = 23
  xlApp.ActiveWindow.ScrollC olumn = 21
  xlApp.ActiveWindow.ScrollC olumn = 19
  xlApp.ActiveWindow.ScrollC olumn = 17
  xlApp.ActiveWindow.ScrollC olumn = 16
  xlApp.ActiveWindow.ScrollC olumn = 14
  xlApp.ActiveWindow.ScrollC olumn = 13
  xlApp.ActiveWindow.ScrollC olumn = 11
  xlApp.ActiveWindow.ScrollC olumn = 10
  xlApp.ActiveWindow.ScrollC olumn = 9
  xlApp.ActiveWindow.ScrollC olumn = 8
  xlApp.ActiveWindow.ScrollC olumn = 7
  xlApp.ActiveWindow.ScrollC olumn = 6
  xlApp.ActiveWindow.ScrollC olumn = 5
  xlApp.ActiveWindow.ScrollC olumn = 4
  xlApp.ActiveWindow.ScrollC olumn = 2
  xlApp.ActiveWindow.ScrollC olumn = 1
   Â
 ActiveWorkbook.Close
 Set xlws = Nothing
 Set xlwb = Nothing
 Set xlApp = Nothing
End Sub
Â
Private Sub ImprtMnthlySprdsht_DblClic
 Â
  msg = "File c:\cad.xls is now importing......"
  Dim strFileName As String
  Dim xlApp As Application
  strFileName = ("C:\cad.xls")
  Set xlApp = New Application
  xlApp.Visible = True
  xlApp.Workbooks.Open strFileName
  xlApp.Cells.Select
  xlApp.Cells.EntireColumn.A
  With xlApp.Selection
    .HorizontalAlignment = xlCenter
    .VerticalAlignment = xlBottom
    .WrapText = False
    .Orientation = 0
    .AddIndent = False
    .ShrinkToFit = False
    .MergeCells = False
    End With
  xlApp.Rows("1:3").Select
  xlApp.Selection.Delete Shift:=xlUp
  xlApp.Range("A1").Select
  xlApp.Windows("Book1").Act
  xlApp.Range("A3").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("A4").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("A2").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("A2").Select
  xlApp.Range("A2").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Range("B5").Select
  xlApp.Application.CutCopyM
  xlApp.Range("A3:A4").Selec
  xlApp.Selection.ClearConte
  xlApp.Range("B6").Select
  xlApp.Windows("sfrt003_naw
  xlApp.Range("A1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("A1").Select
  xlApp.Selection.Copy
  xlApp.ActiveSheet.Paste
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("A2:A3").Selec
  xlApp.Selection.ClearConte
  xlApp.Range("A12:A34").Sel
  xlApp.ActiveWindow.SmallSc
  xlApp.ActiveWindow.SmallSc
  xlApp.Range("B2").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("B3").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("B1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("B1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("B2:B3").Selec
  xlApp.Selection.ClearConte
  xlApp.Range("C2").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("C1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("C1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("C2:C3").Selec
  xlApp.Selection.ClearConte
  xlApp.Range("D2").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("D1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("D1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Range("D6").Select
  xlApp.Application.CutCopyM
  xlApp.Range("D2:D3").Selec
  xlApp.Selection.ClearConte
  xlApp.Range("C1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("D1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("E2").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("E1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("E1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("E2:E3").Selec
  xlApp.Selection.ClearConte
  xlApp.xlApp.Columns("E:E")
  xlApp.Range("E1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("F2").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("F1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("F1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("F2:F3").Selec
  xlApp.Selection.ClearConte
  xlApp.Range("F1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("G1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("G1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.ActiveSheet.Paste
  xlApp.Application.CutCopyM
  xlApp.Range("G3").Select
  xlApp.Selection.ClearConte
  xlApp.Range("H1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("H1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("I1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("I1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("H3:I3").Selec
  xlApp.Selection.ClearConte
  xlApp.Range("J2").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("J1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("J1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("J2:J3").Selec
  xlApp.Selection.ClearConte
  xlApp.xlApp.Columns("J:J")
  xlApp.Range("K3").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("K1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("K1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("K2:K3").Selec
  xlApp.Selection.ClearConte
  xlApp.ActiveWindow.SmallSc
  xlApp.Range("L3").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("L1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("L1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("L2:L3").Selec
  xlApp.Selection.ClearConte
  xlApp.Range("M1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("M1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("M3").Select
  xlApp.Selection.ClearConte
  xlApp.Range("N1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("N1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("N3").Select
  xlApp.Selection.ClearConte
  xlApp.Range("O1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("O1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("O2:O3").Selec
  xlApp.Selection.ClearConte
  xlApp.ActiveWindow.SmallSc
  xlApp.Range("O1").Select
  xlApp.Range("P1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("P1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("Q1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("S1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("P1:S1").Selec
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("S1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("R4").Select
  xlApp.xlApp.Columns("R:R")
  xlApp.xlApp.Columns("R:R")
  xlApp.xlApp.Columns("R:R")
  xlApp.xlApp.Columns("Q:Q")
  xlApp.xlApp.Columns("P:P")
  xlApp.Range("R1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("R1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("T1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("T1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("U1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("U1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.ActiveWindow.SmallSc
  xlApp.Range("V1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("V1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("W1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("W1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("X1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("X1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.ActiveSheet.Paste
  xlApp.Application.CutCopyM
  xlApp.Range("Y1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("Y1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("Z1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("Z1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AA1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AA2").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AA1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AB2").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AB1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AB1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AB1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("AC1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AC1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Range("Y4").Select
  xlApp.Application.CutCopyM
  xlApp.Range("AC1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AE1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AE1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("AF1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AF1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("AG1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AG1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("AH2").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AH3").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AH1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AH1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("AI1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AI1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("AJ1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AJ1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("AK1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AK1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.ActiveWindow.SmallSc
  xlApp.Range("AL1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AL1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("AM3").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AM1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AM1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("AN3").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AN1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AN3").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AN1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("AO2").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AO3").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AO1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AO1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("AP3").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AP1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AP1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("AQ3").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AQ3").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AQ1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AQ1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("AR3").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AR1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AR1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.ActiveWindow.SmallSc
  xlApp.Range("AS3").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AS2").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AS1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AS1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("AT3").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AT1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AT1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("AU3").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AU1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AU1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("AV3").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AV1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AV1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("AW1").Select
  xlApp.ActiveWindow.SmallSc
  xlApp.Range("AX3").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AX1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AX1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("AW3").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AW2").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AW1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AW1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.xlApp.Columns("AW:AW
  xlApp.xlApp.Columns("AX:AX
  xlApp.Range("AW2:AW3").Sel
  xlApp.Selection.ClearConte
  xlApp.Range("AX2:AX3").Sel
  xlApp.Selection.ClearConte
  xlApp.Range("AY3").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AY2").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AY1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AY1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("AZ1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("AZ1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("BA1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("BA1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("BB1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("BB1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("BC2").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("BB12").Select
  xlApp.ActiveWindow.SmallSc
  xlApp.Range("BC1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("BC1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("BC1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("BC1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("BD3").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("BD1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("BD1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("BE2").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("BE1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("BE1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("BF2").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("BF1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("BF1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("BG1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("BG1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("BH1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("BH1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.ActiveWindow.SmallSc
  xlApp.Range("BI1").Select
  xlApp.ActiveCell.FormulaR1
  xlApp.Range("BI1").Select
  xlApp.Selection.Copy
  xlApp.Selection.PasteSpeci
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Rows("2:3").Select
  xlApp.Range("BE2").Activat
  xlApp.Selection.Delete Shift:=xlUp
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.Range("K34").Select
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  Cells.Select
  xlApp.Selection.NumberForm
  xlApp.Windows("Book1").Act
  Workbooks.Open Filename:="C:\B9\TEST4_sfr
  xlApp.ActiveWindow.LargeSc
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.Windows("sfrt003_naw
  xlApp.Selection.Replace What:="", Replacement:="""""", LookAt:=xlPart, _
    SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
    ReplaceFormat:=False
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.Windows("TEST4_sfrt0
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.SmallSc
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.ActiveWindow.ScrollR
  xlApp.Windows("sfrt003_naw
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
  xlApp.ActiveWindow.ScrollC
   Â
 ActiveWorkbook.Close
 Set xlws = Nothing
 Set xlwb = Nothing
 Set xlApp = Nothing
End Sub
Â
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Thanks but I've tried that and I get the compile error: Â User-defined type not defined. Â :-( Â Â Maybe you may know of a better way to go about doing this. Â The file that I need to import from Excel has a 2 title lines that I delete using the macro and then the column titles are split between two rows, which I merge the values into another cell and delete the originals. Â This way the column headers are the same as they are in the database. Â YIKES!
besides the references chnages suggested above you are still going to have problems. While I did not read all of your code (please get rid of all the Scroll stuff) you reference another workbook that you code does not open ...
xlApp.Windows("sfrt003_naw cad.xls"). Activate
Steve
xlApp.Windows("sfrt003_naw
Steve
Did you look at my second post ? Â The reference should solve your "User-defined type not defined" problem
ASKER
Boy, you all are quick! Â Let's see, I added the Reference to microsoft Excel. Â Ummmm...I tried to not send up the real name of my file, but it actually is "C:\sfrt003_nawcad.xls". Â How I came about creating this script was that I went into excel and created a macro then cut &Â pasted it into my event. Â So, what you're telling me is that I can remove all of the lines that have ".ScrollColumn" also? Â Sorry but I'm really an Oracle DBA and an Access novice!!!!! Â I've done VBScripting and some other VB coding awhile ago, so I'm winging it here!
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Well, this would certainly make things more readable. Â Give me a few minutes &Â I'll get back with results from the recommendations thus far!
ASKER
You people ROCK!!!! Â Thank you....thank you....thank you both! Â Not only is my function working, my code is much more easy to follow! Â The only thing is that I would like to add to the code to save the changes made to the .xls file then import the data from the .xls file into Access. Â Correct me if I'm wrong, but by using the "xlapp.visible = false" command I won't be able to see the .xls file while I'm running my code against it (which is what I want). Â I've put my new code into here, but I've eliminated the redundant lines. Â
Private Sub ImprtMnthlySprdsht_DblClic k(Cancel As Integer)
 Â
  msg = "File is now importing......"
  Dim strFileName As String
  Dim xlApp As Excel.Application
  strFileName = ("C:\B9\sfrt003_nawcad.xls ")
  Set xlApp = New Excel.Application
  xlApp.Visible = False
  xlApp.Workbooks.Open strFileName
  xlApp.Cells.Select
  xlApp.Cells.EntireColumn.A utoFit
  With xlApp.Selection
    .HorizontalAlignment = xlCenter
    .VerticalAlignment = xlBottom
    .WrapText = False
    .Orientation = 0
    .AddIndent = False
    .ShrinkToFit = False
    .MergeCells = False
    End With
  xlApp.Rows("1:3").Select
  xlApp.Selection.Delete Shift:=xlUp
  xlApp.Range("A1").FormulaR 1C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("A1").Copy
  xlApp.Range("A1").PasteSpe cial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("A2:A3").Clear Contents
  xlApp.Range("B2").FormulaR 1C1 = "PURCHASE-ORDER"
  xlApp.Range("B3").FormulaR 1C1 = "FUND-DOC"
  xlApp.Range("B1").FormulaR 1C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("B1").Copy
  xlApp.Range("B1").PasteSpe cial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("B2:B3").Clear Contents
  xlApp.Range("C2").FormulaR 1C1 = "FOB-PO"
  xlApp.Range("C1").FormulaR 1C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("C1").Copy
  xlApp.Range("C1").PasteSpe cial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
  xlApp.Application.CutCopyM ode = False
  xlApp.Range("C2:C3").Clear Contents
  xlApp.Range("D2").FormulaR 1C1 = "WORK-COMP"
  xlApp.Range("D1").FormulaR 1C1 = "=CONCATENATE(R[1]C,""-"", R[2]C)"
  xlApp.Range("D1").Copy
  xlApp.Range("D1").PasteSpe cial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
...............(lots of other code)..................... .........
  xlApp.Rows("2:3").Select
  xlApp.Selection.Delete Shift:=xlUp
  Cells.Select
  xlApp.Selection.Replace What:="", Replacement:="""""", LookAt:=xlPart, _
    SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
    ReplaceFormat:=False
  ActiveWorkbook.Close
 Set xlws = Nothing
 Set xlwb = Nothing
 Set xlApp = Nothing
End Sub
Private Sub ImprtMnthlySprdsht_DblClic
 Â
  msg = "File is now importing......"
  Dim strFileName As String
  Dim xlApp As Excel.Application
  strFileName = ("C:\B9\sfrt003_nawcad.xls
  Set xlApp = New Excel.Application
  xlApp.Visible = False
  xlApp.Workbooks.Open strFileName
  xlApp.Cells.Select
  xlApp.Cells.EntireColumn.A
  With xlApp.Selection
    .HorizontalAlignment = xlCenter
    .VerticalAlignment = xlBottom
    .WrapText = False
    .Orientation = 0
    .AddIndent = False
    .ShrinkToFit = False
    .MergeCells = False
    End With
  xlApp.Rows("1:3").Select
  xlApp.Selection.Delete Shift:=xlUp
  xlApp.Range("A1").FormulaR
  xlApp.Range("A1").Copy
  xlApp.Range("A1").PasteSpe
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("A2:A3").Clear
  xlApp.Range("B2").FormulaR
  xlApp.Range("B3").FormulaR
  xlApp.Range("B1").FormulaR
  xlApp.Range("B1").Copy
  xlApp.Range("B1").PasteSpe
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("B2:B3").Clear
  xlApp.Range("C2").FormulaR
  xlApp.Range("C1").FormulaR
  xlApp.Range("C1").Copy
  xlApp.Range("C1").PasteSpe
    :=False, Transpose:=False
  xlApp.Application.CutCopyM
  xlApp.Range("C2:C3").Clear
  xlApp.Range("D2").FormulaR
  xlApp.Range("D1").FormulaR
  xlApp.Range("D1").Copy
  xlApp.Range("D1").PasteSpe
    :=False, Transpose:=False
...............(lots of other code).....................
  xlApp.Rows("2:3").Select
  xlApp.Selection.Delete Shift:=xlUp
  Cells.Select
  xlApp.Selection.Replace What:="", Replacement:="""""", LookAt:=xlPart, _
    SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
    ReplaceFormat:=False
  ActiveWorkbook.Close
 Set xlws = Nothing
 Set xlwb = Nothing
 Set xlApp = Nothing
End Sub
<add to the code to save the changes made to the .xls file>
'save the workbook
xlWB.Save
'you have to / should close it before importing
xlWB.Close
'cleanup
Set xlWS = Nothing
Set xlWB = Nothing
'make sure the instance of Excel is not still running in task mamanger !
xlApp.Quit
Set xlApp = Nothing
<import the data from the .xls file into Access>
Do you want to import the data into an existing table, create a new table or just link to the spreadsheet?
Steve
'save the workbook
xlWB.Save
'you have to / should close it before importing
xlWB.Close
'cleanup
Set xlWS = Nothing
Set xlWB = Nothing
'make sure the instance of Excel is not still running in task mamanger !
xlApp.Quit
Set xlApp = Nothing
<import the data from the .xls file into Access>
Do you want to import the data into an existing table, create a new table or just link to the spreadsheet?
Steve
ASKER
Thank you sir. Â Would this also work to save &Â close: Â
  xlApp.ActiveWorkbook.Save
  xlApp.ActiveWorkbook.Close
I want to import the data into an existing table and my spreadsheet does have column headings the coincide with the table fields.
  xlApp.ActiveWorkbook.Save
  xlApp.ActiveWorkbook.Close
I want to import the data into an existing table and my spreadsheet does have column headings the coincide with the table fields.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
I've been researching about creating links but I can't find a good example on how to do this &Â then create the append query. Â Do you have any suggestions or can you point me in the right direction?
ASKER
TAH~DAH! Â I've got it to work! Â
I added this line:
  DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "BUDGET_SPEND_PLAN", "C:\B9\sfrt003_nawcad.xls" , True
Please assign 80% points to stevbe and 20% to jmanatha709. Â This issue may be closed!
I added this line:
  DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "BUDGET_SPEND_PLAN", "C:\B9\sfrt003_nawcad.xls"
Please assign 80% points to stevbe and 20% to jmanatha709. Â This issue may be closed!
In your code module, choose menu Tools -> References
In the list find Microsoft Excel XX.X Object Library and check it.
Retry your function