I have an Access database that I am trying to use to take 24 delimited files and save them as Excel. There are 24 files and they are quite large and I only need some of the data. So I have linked the Excel files to my Access db and have a union query that unites all the files and only pulls the data I need from the files and then an append query that adds that data to a table. The reason I need to do this regularly is that the files change every week. So every week I need to take these refreshed text files, overwrite the existing Excel files so the existing link has the fresh data, so I can unite them and save only the needed data to an existing table. I hope that wasn't to much info. Anyway, I had code working in my test db. As soon as I moved it to my real db, it doesn't work. I get an "object required" error. There is no error number or anything on the error message. I was running some test codes before this code in my test db so I am not sure if one of those allowed this to work but now I moved it to my real db where those test codes weren't run it doesn't allow this one to work? I am not very familar with VBA so I am sure it is something easy but I just can't figure it out. Can someone please help me fix this error?? Thanks. Here is the code:
Option Compare Database
Private Sub Command0_Click()
On Error GoTo Err_Command0_Click
DoCmd.SetWarnings False
ChDir "P:\Revenue Assurance"
Workbooks.OpenText Filename:= _
"P:\Revenue Assurance\ascii.AC32.2007"
, Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=Fals
e, Tab:=False, Semicolon:=False _
, Comma:=True, Space:=False, Other:=True, OtherChar:="|", FieldInfo:= _
Array(Array(1, 2), Array(2, 2), Array(3, 2), Array(4, 2), Array(5, 1), Array(6, 1), Array(7 _
, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1), Array _
(14, 1), Array(15, 1), Array(16, 1), Array(17, 1), Array(18, 1))
Range("HB1").Select
ActiveCell.FormulaR1C1 = "AC32"
Range("HB2").Select
ActiveCell.FormulaR1C1 = "AC32"
Dim lastrow As Long
lastrow = Worksheets("ascii.AC32").R
ange("A1")
.End(xlDow
n).Row
With Worksheets("ascii.AC32").R
ange(" HB1:HB2").Select
Selection.AutoFill Destination:=Range("HB1:HB
" & lastrow&)
End With
ActiveWorkbook.SaveAs Filename:= _
"P:\Revenue Assurance\View1-AC32.xls",
FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False
_
, CreateBackup:=False
Workbooks.OpenText Filename:= _
"P:\Revenue Assurance\ascii.AC5001.200
7", Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=Fals
e, Tab:=False, Semicolon:=False _
, Comma:=True, Space:=False, Other:=True, OtherChar:="|", FieldInfo:= _
Array(Array(1, 2), Array(2, 2), Array(3, 2), Array(4, 2), Array(5, 1), Array(6, 1), Array(7 _
, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1), Array _
(14, 1), Array(15, 1), Array(16, 1), Array(17, 1), Array(18, 1))
Range("HB1").Select
ActiveCell.FormulaR1C1 = "AC50"
Range("HB2").Select
ActiveCell.FormulaR1C1 = "AC50"
lastrow = Worksheets("ascii.AC5001")
.Range("A1
").End(xlD
own).Row
With Worksheets("ascii.AC5001")
.Range(" HB1:HB2").Select
Selection.AutoFill Destination:=Range("HB1:HB
" & lastrow&)
End With
ActiveWorkbook.SaveAs Filename:= _
"P:\Revenue Assurance\View1-AC5001.xls
", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False
_
, CreateBackup:=False
Workbooks.OpenText Filename:= _
"P:\Revenue Assurance\ascii.CO01.2007"
, Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=Fals
e, Tab:=False, Semicolon:=False _
, Comma:=True, Space:=False, Other:=True, OtherChar:="|", FieldInfo:= _
Array(Array(1, 2), Array(2, 2), Array(3, 2), Array(4, 2), Array(5, 1), Array(6, 1), Array(7 _
, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1), Array _
(14, 1), Array(15, 1), Array(16, 1), Array(17, 1), Array(18, 1))
Range("HB1").Select
ActiveCell.FormulaR1C1 = "CO01"
Range("HB2").Select
ActiveCell.FormulaR1C1 = "CO01"
lastrow = Worksheets("ascii.CO01").R
ange("A1")
.End(xlDow
n).Row
With Worksheets("ascii.CO01").R
ange(" HB1:HB2").Select
Selection.AutoFill Destination:=Range("HB1:HB
" & lastrow&)
End With
ActiveWorkbook.SaveAs Filename:= _
"P:\Revenue Assurance\View1-CO01.xls",
FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False
_
, CreateBackup:=False
Workbooks.OpenText Filename:= _
"P:\Revenue Assurance\ascii.CO02.2007"
, Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=Fals
e, Tab:=False, Semicolon:=False _
, Comma:=True, Space:=False, Other:=True, OtherChar:="|", FieldInfo:= _
Array(Array(1, 2), Array(2, 2), Array(3, 2), Array(4, 2), Array(5, 1), Array(6, 1), Array(7 _
, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1), Array _
(14, 1), Array(15, 1), Array(16, 1), Array(17, 1), Array(18, 1))
Range("HB1").Select
ActiveCell.FormulaR1C1 = "CO02"
Range("HB2").Select
ActiveCell.FormulaR1C1 = "CO02"
lastrow = Worksheets("ascii.CO02").R
ange("A1")
.End(xlDow
n).Row
With Worksheets("ascii.CO02").R
ange(" HB1:HB2").Select
Selection.AutoFill Destination:=Range("HB1:HB
" & lastrow&)
End With
ActiveWorkbook.SaveAs Filename:= _
"P:\Revenue Assurance\View1-CO02.xls",
FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False
_
, CreateBackup:=False
Workbooks.OpenText Filename:= _
"P:\Revenue Assurance\ascii.FRBL01.200
7", Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=Fals
e, Tab:=False, Semicolon:=False _
, Comma:=True, Space:=False, Other:=True, OtherChar:="|", FieldInfo:= _
Array(Array(1, 2), Array(2, 2), Array(3, 2), Array(4, 2), Array(5, 1), Array(6, 1), Array(7 _
, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1), Array _
(14, 1), Array(15, 1), Array(16, 1), Array(17, 1), Array(18, 1))
Range("HB1").Select
ActiveCell.FormulaR1C1 = "FRBL01"
Range("HB2").Select
ActiveCell.FormulaR1C1 = "FRBL01"
lastrow = Worksheets("ascii.FRBL01")
.Range("A1
").End(xlD
own).Row
With Worksheets("ascii.FRBL01")
.Range(" HB1:HB2").Select
Selection.AutoFill Destination:=Range("HB1:HB
" & lastrow&)
End With
ActiveWorkbook.SaveAs Filename:= _
"P:\Revenue Assurance\View1-FRBL01.xls
", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False
_
, CreateBackup:=False
Workbooks.OpenText Filename:= _
"P:\Revenue Assurance\ascii.FRBL07.200
7", Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=Fals
e, Tab:=False, Semicolon:=False _
, Comma:=True, Space:=False, Other:=True, OtherChar:="|", FieldInfo:= _
Array(Array(1, 2), Array(2, 2), Array(3, 2), Array(4, 2), Array(5, 1), Array(6, 1), Array(7 _
, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1), Array _
(14, 1), Array(15, 1), Array(16, 1), Array(17, 1), Array(18, 1))
Range("HB1").Select
ActiveCell.FormulaR1C1 = "FRBL07"
Range("HB2").Select
ActiveCell.FormulaR1C1 = "FRBL07"
lastrow = Worksheets("ascii.FRBL07")
.Range("A1
").End(xlD
own).Row
With Worksheets("ascii.FRBL07")
.Range(" HB1:HB2").Select
Selection.AutoFill Destination:=Range("HB1:HB
" & lastrow&)
End With
ActiveWorkbook.SaveAs Filename:= _
"P:\Revenue Assurance\View1-FRBL07.xls
", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False
_
, CreateBackup:=False
Workbooks.OpenText Filename:= _
"P:\Revenue Assurance\ascii.FRBL13.200
7", Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=Fals
e, Tab:=False, Semicolon:=False _
, Comma:=True, Space:=False, Other:=True, OtherChar:="|", FieldInfo:= _
Array(Array(1, 2), Array(2, 2), Array(3, 2), Array(4, 2), Array(5, 1), Array(6, 1), Array(7 _
, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1), Array _
(14, 1), Array(15, 1), Array(16, 1), Array(17, 1), Array(18, 1))
Range("HB1").Select
ActiveCell.FormulaR1C1 = "FRBL13"
Range("HB2").Select
ActiveCell.FormulaR1C1 = "FRBL13"
lastrow = Worksheets("ascii.FRBL13")
.Range("A1
").End(xlD
own).Row
With Worksheets("ascii.FRBL13")
.Range(" HB1:HB2").Select
Selection.AutoFill Destination:=Range("HB1:HB
" & lastrow&)
End With
ActiveWorkbook.SaveAs Filename:= _
"P:\Revenue Assurance\View1-FRBL13.xls
", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False
_
, CreateBackup:=False
Workbooks.OpenText Filename:= _
"P:\Revenue Assurance\ascii.FRBL19.200
7", Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=Fals
e, Tab:=False, Semicolon:=False _
, Comma:=True, Space:=False, Other:=True, OtherChar:="|", FieldInfo:= _
Array(Array(1, 2), Array(2, 2), Array(3, 2), Array(4, 2), Array(5, 1), Array(6, 1), Array(7 _
, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1), Array _
(14, 1), Array(15, 1), Array(16, 1), Array(17, 1), Array(18, 1))
Range("HB1").Select
ActiveCell.FormulaR1C1 = "FRBL19"
Range("HB2").Select
ActiveCell.FormulaR1C1 = "FRBL19"
lastrow = Worksheets("ascii.FRBL19")
.Range("A1
").End(xlD
own).Row
With Worksheets("ascii.FRBL19")
.Range(" HB1:HB2").Select
Selection.AutoFill Destination:=Range("HB1:HB
" & lastrow&)
End With
ActiveWorkbook.SaveAs Filename:= _
"P:\Revenue Assurance\View1-FRBL19.xls
", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False
_
, CreateBackup:=False
Workbooks.OpenText Filename:= _
"P:\Revenue Assurance\ascii.FRBL25.200
7", Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=Fals
e, Tab:=False, Semicolon:=False _
, Comma:=True, Space:=False, Other:=True, OtherChar:="|", FieldInfo:= _
Array(Array(1, 2), Array(2, 2), Array(3, 2), Array(4, 2), Array(5, 1), Array(6, 1), Array(7 _
, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1), Array _
(14, 1), Array(15, 1), Array(16, 1), Array(17, 1), Array(18, 1))
Range("HB1").Select
ActiveCell.FormulaR1C1 = "FRBL25"
Range("HB2").Select
ActiveCell.FormulaR1C1 = "FRBL25"
lastrow = Worksheets("ascii.FRBL25")
.Range("A1
").End(xlD
own).Row
With Worksheets("ascii.FRBL25")
.Range(" HB1:HB2").Select
Selection.AutoFill Destination:=Range("HB1:HB
" & lastrow&)
End With
ActiveWorkbook.SaveAs Filename:= _
"P:\Revenue Assurance\View1-FRBL25.xls
", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False
_
, CreateBackup:=False
Workbooks.OpenText Filename:= _
"P:\Revenue Assurance\ascii.LKCR01.200
7", Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=Fals
e, Tab:=False, Semicolon:=False _
, Comma:=True, Space:=False, Other:=True, OtherChar:="|", FieldInfo:= _
Array(Array(1, 2), Array(2, 2), Array(3, 2), Array(4, 2), Array(5, 1), Array(6, 1), Array(7 _
, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1), Array _
(14, 1), Array(15, 1), Array(16, 1), Array(17, 1), Array(18, 1))
Range("HB1").Select
ActiveCell.FormulaR1C1 = "LKCR01"
Range("HB2").Select
ActiveCell.FormulaR1C1 = "LKCR01"
lastrow = Worksheets("ascii.LKCR01")
.Range("A1
").End(xlD
own).Row
With Worksheets("ascii.LKCR01")
.Range(" HB1:HB2").Select
Selection.AutoFill Destination:=Range("HB1:HB
" & lastrow&)
End With
ActiveWorkbook.SaveAs Filename:= _
"P:\Revenue Assurance\View1-LKCR01.xls
", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False
_
, CreateBackup:=False
Workbooks.OpenText Filename:= _
"P:\Revenue Assurance\ascii.NWLD01.200
7", Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=Fals
e, Tab:=False, Semicolon:=False _
, Comma:=True, Space:=False, Other:=True, OtherChar:="|", FieldInfo:= _
Array(Array(1, 2), Array(2, 2), Array(3, 2), Array(4, 2), Array(5, 1), Array(6, 1), Array(7 _
, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1), Array _
(14, 1), Array(15, 1), Array(16, 1), Array(17, 1), Array(18, 1))
Range("HB1").Select
ActiveCell.FormulaR1C1 = "NWLD01"
Range("HB2").Select
ActiveCell.FormulaR1C1 = "NWLD01"
lastrow = Worksheets("ascii.NWLD01")
.Range("A1
").End(xlD
own).Row
With Worksheets("ascii.NWLD01")
.Range(" HB1:HB2").Select
Selection.AutoFill Destination:=Range("HB1:HB
" & lastrow&)
End With
ActiveWorkbook.SaveAs Filename:= _
"P:\Revenue Assurance\View1-NWLD01.xls
", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False
_
, CreateBackup:=False
Workbooks.OpenText Filename:= _
"P:\Revenue Assurance\ascii.STCL.2007"
, Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=Fals
e, Tab:=False, Semicolon:=False _
, Comma:=True, Space:=False, Other:=True, OtherChar:="|", FieldInfo:= _
Array(Array(1, 2), Array(2, 2), Array(3, 2), Array(4, 2), Array(5, 1), Array(6, 1), Array(7 _
, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1), Array _
(14, 1), Array(15, 1), Array(16, 1), Array(17, 1), Array(18, 1))
Range("HB1").Select
ActiveCell.FormulaR1C1 = "STCL"
Range("HB2").Select
ActiveCell.FormulaR1C1 = "STCL"
lastrow = Worksheets("ascii.STCL").R
ange("A1")
.End(xlDow
n).Row
With Worksheets("ascii.STCL").R
ange(" HB1:HB2").Select
Selection.AutoFill Destination:=Range("HB1:HB
" & lastrow&)
End With
ActiveWorkbook.SaveAs Filename:= _
"P:\Revenue Assurance\View1-STCL.xls",
FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False
_
, CreateBackup:=False
Workbooks.OpenText Filename:= _
"P:\Revenue Assurance\ascii.STPR1.2007
", Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=Fals
e, Tab:=False, Semicolon:=False _
, Comma:=True, Space:=False, Other:=True, OtherChar:="|", FieldInfo:= _
Array(Array(1, 2), Array(2, 2), Array(3, 2), Array(4, 2), Array(5, 1), Array(6, 1), Array(7 _
, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1), Array _
(14, 1), Array(15, 1), Array(16, 1), Array(17, 1), Array(18, 1))
Range("HB1").Select
ActiveCell.FormulaR1C1 = "STPR1"
Range("HB2").Select
ActiveCell.FormulaR1C1 = "STPR1"
lastrow = Worksheets("ascii.STPR1").
Range("A1"
).End(xlDo
wn).Row
With Worksheets("ascii.STPR1").
Range(" HB1:HB2").Select
Selection.AutoFill Destination:=Range("HB1:HB
" & lastrow&)
End With
ActiveWorkbook.SaveAs Filename:= _
"P:\Revenue Assurance\View1-STPR1.xls"
, FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False
_
, CreateBackup:=False
Workbooks.OpenText Filename:= _
"P:\Revenue Assurance\ascii.STPR2.2007
", Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=Fals
e, Tab:=False, Semicolon:=False _
, Comma:=True, Space:=False, Other:=True, OtherChar:="|", FieldInfo:= _
Array(Array(1, 2), Array(2, 2), Array(3, 2), Array(4, 2), Array(5, 1), Array(6, 1), Array(7 _
, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1), Array _
(14, 1), Array(15, 1), Array(16, 1), Array(17, 1), Array(18, 1))
Range("HB1").Select
ActiveCell.FormulaR1C1 = "STPR2"
Range("HB2").Select
ActiveCell.FormulaR1C1 = "STPR2"
lastrow = Worksheets("ascii.STPR2").
Range("A1"
).End(xlDo
wn).Row
With Worksheets("ascii.STPR2").
Range(" HB1:HB2").Select
Selection.AutoFill Destination:=Range("HB1:HB
" & lastrow&)
End With
ActiveWorkbook.SaveAs Filename:= _
"P:\Revenue Assurance\View1-STPR2.xls"
, FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False
_
, CreateBackup:=False
Workbooks.OpenText Filename:= _
"P:\Revenue Assurance\ascii.STPR3.2007
", Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=Fals
e, Tab:=False, Semicolon:=False _
, Comma:=True, Space:=False, Other:=True, OtherChar:="|", FieldInfo:= _
Array(Array(1, 2), Array(2, 2), Array(3, 2), Array(4, 2), Array(5, 1), Array(6, 1), Array(7 _
, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1), Array _
(14, 1), Array(15, 1), Array(16, 1), Array(17, 1), Array(18, 1))
Range("HB1").Select
ActiveCell.FormulaR1C1 = "STPR3"
Range("HB2").Select
ActiveCell.FormulaR1C1 = "STPR3"
lastrow = Worksheets("ascii.STPR3").
Range("A1"
).End(xlDo
wn).Row
With Worksheets("ascii.STPR3").
Range(" HB1:HB2").Select
Selection.AutoFill Destination:=Range("HB1:HB
" & lastrow&)
End With
ActiveWorkbook.SaveAs Filename:= _
"P:\Revenue Assurance\View1-STPR3.xls"
, FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False
_
, CreateBackup:=False
Workbooks.OpenText Filename:= _
"P:\Revenue Assurance\ascii.STPR4.2007
", Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=Fals
e, Tab:=False, Semicolon:=False _
, Comma:=True, Space:=False, Other:=True, OtherChar:="|", FieldInfo:= _
Array(Array(1, 2), Array(2, 2), Array(3, 2), Array(4, 2), Array(5, 1), Array(6, 1), Array(7 _
, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1), Array _
(14, 1), Array(15, 1), Array(16, 1), Array(17, 1), Array(18, 1))
Range("HB1").Select
ActiveCell.FormulaR1C1 = "STPR4"
Range("HB2").Select
ActiveCell.FormulaR1C1 = "STPR4"
lastrow = Worksheets("ascii.STPR4").
Range("A1"
).End(xlDo
wn).Row
With Worksheets("ascii.STPR4").
Range(" HB1:HB2").Select
Selection.AutoFill Destination:=Range("HB1:HB
" & lastrow&)
End With
ActiveWorkbook.SaveAs Filename:= _
"P:\Revenue Assurance\View1-STPR4.xls"
, FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False
_
, CreateBackup:=False
Workbooks.OpenText Filename:= _
"P:\Revenue Assurance\ascii.STPR5.2007
", Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=Fals
e, Tab:=False, Semicolon:=False _
, Comma:=True, Space:=False, Other:=True, OtherChar:="|", FieldInfo:= _
Array(Array(1, 2), Array(2, 2), Array(3, 2), Array(4, 2), Array(5, 1), Array(6, 1), Array(7 _
, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1), Array _
(14, 1), Array(15, 1), Array(16, 1), Array(17, 1), Array(18, 1))
Range("HB1").Select
ActiveCell.FormulaR1C1 = "STPR5"
Range("HB2").Select
ActiveCell.FormulaR1C1 = "STPR5"
lastrow = Worksheets("ascii.STPR5").
Range("A1"
).End(xlDo
wn).Row
With Worksheets("ascii.STPR5").
Range(" HB1:HB2").Select
Selection.AutoFill Destination:=Range("HB1:HB
" & lastrow&)
End With
ActiveWorkbook.SaveAs Filename:= _
"P:\Revenue Assurance\View1-STPR5.xls"
, FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False
_
, CreateBackup:=False
Workbooks.OpenText Filename:= _
"P:\Revenue Assurance\ascii.URDL01.200
7", Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=Fals
e, Tab:=False, Semicolon:=False _
, Comma:=True, Space:=False, Other:=True, OtherChar:="|", FieldInfo:= _
Array(Array(1, 2), Array(2, 2), Array(3, 2), Array(4, 2), Array(5, 1), Array(6, 1), Array(7 _
, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1), Array _
(14, 1), Array(15, 1), Array(16, 1), Array(17, 1), Array(18, 1))
Range("HB1").Select
ActiveCell.FormulaR1C1 = "URDL01"
Range("HB2").Select
ActiveCell.FormulaR1C1 = "URDL01"
lastrow = Worksheets("ascii.URDL01")
.Range("A1
").End(xlD
own).Row
With Worksheets("ascii.URDL01")
.Range(" HB1:HB2").Select
Selection.AutoFill Destination:=Range("HB1:HB
" & lastrow&)
End With
ActiveWorkbook.SaveAs Filename:= _
"P:\Revenue Assurance\View1-URDL01.xls
", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False
_
, CreateBackup:=False
Workbooks.OpenText Filename:= _
"P:\Revenue Assurance\ascii.WASC01.200
7", Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=Fals
e, Tab:=False, Semicolon:=False _
, Comma:=True, Space:=False, Other:=True, OtherChar:="|", FieldInfo:= _
Array(Array(1, 2), Array(2, 2), Array(3, 2), Array(4, 2), Array(5, 1), Array(6, 1), Array(7 _
, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1), Array _
(14, 1), Array(15, 1), Array(16, 1), Array(17, 1), Array(18, 1))
Range("HB1").Select
ActiveCell.FormulaR1C1 = "WASC01"
Range("HB2").Select
ActiveCell.FormulaR1C1 = "WASC01"
lastrow = Worksheets("ascii.WASC01")
.Range("A1
").End(xlD
own).Row
With Worksheets("ascii.WASC01")
.Range(" HB1:HB2").Select
Selection.AutoFill Destination:=Range("HB1:HB
" & lastrow&)
End With
ActiveWorkbook.SaveAs Filename:= _
"P:\Revenue Assurance\View1-WASC01.xls
", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False
_
, CreateBackup:=False
Workbooks.OpenText Filename:= _
"P:\Revenue Assurance\ascii.WASC07.200
7", Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=Fals
e, Tab:=False, Semicolon:=False _
, Comma:=True, Space:=False, Other:=True, OtherChar:="|", FieldInfo:= _
Array(Array(1, 2), Array(2, 2), Array(3, 2), Array(4, 2), Array(5, 1), Array(6, 1), Array(7 _
, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1), Array _
(14, 1), Array(15, 1), Array(16, 1), Array(17, 1), Array(18, 1))
Range("HB1").Select
ActiveCell.FormulaR1C1 = "WASC07"
Range("HB2").Select
ActiveCell.FormulaR1C1 = "WASC07"
lastrow = Worksheets("ascii.WASC07")
.Range("A1
").End(xlD
own).Row
With Worksheets("ascii.WASC07")
.Range(" HB1:HB2").Select
Selection.AutoFill Destination:=Range("HB1:HB
" & lastrow&)
End With
ActiveWorkbook.SaveAs Filename:= _
"P:\Revenue Assurance\View1-WASC07.xls
", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False
_
, CreateBackup:=False
Workbooks.OpenText Filename:= _
"P:\Revenue Assurance\ascii.WASC13.200
7", Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=Fals
e, Tab:=False, Semicolon:=False _
, Comma:=True, Space:=False, Other:=True, OtherChar:="|", FieldInfo:= _
Array(Array(1, 2), Array(2, 2), Array(3, 2), Array(4, 2), Array(5, 1), Array(6, 1), Array(7 _
, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1), Array _
(14, 1), Array(15, 1), Array(16, 1), Array(17, 1), Array(18, 1))
Range("HB1").Select
ActiveCell.FormulaR1C1 = "WASC13"
Range("HB2").Select
ActiveCell.FormulaR1C1 = "WASC13"
lastrow = Worksheets("ascii.WASC13")
.Range("A1
").End(xlD
own).Row
With Worksheets("ascii.WASC13")
.Range(" HB1:HB2").Select
Selection.AutoFill Destination:=Range("HB1:HB
" & lastrow&)
End With
ActiveWorkbook.SaveAs Filename:= _
"P:\Revenue Assurance\View1-WASC13.xls
", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False
_
, CreateBackup:=False
Workbooks.OpenText Filename:= _
"P:\Revenue Assurance\ascii.WASC19.200
7", Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=Fals
e, Tab:=False, Semicolon:=False _
, Comma:=True, Space:=False, Other:=True, OtherChar:="|", FieldInfo:= _
Array(Array(1, 2), Array(2, 2), Array(3, 2), Array(4, 2), Array(5, 1), Array(6, 1), Array(7 _
, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1), Array _
(14, 1), Array(15, 1), Array(16, 1), Array(17, 1), Array(18, 1))
Range("HB1").Select
ActiveCell.FormulaR1C1 = "WASC19"
Range("HB2").Select
ActiveCell.FormulaR1C1 = "WASC19"
lastrow = Worksheets("ascii.WASC19")
.Range("A1
").End(xlD
own).Row
With Worksheets("ascii.WASC19")
.Range(" HB1:HB2").Select
Selection.AutoFill Destination:=Range("HB1:HB
" & lastrow&)
End With
ActiveWorkbook.SaveAs Filename:= _
"P:\Revenue Assurance\View1-WASC19.xls
", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False
_
, CreateBackup:=False
Workbooks.OpenText Filename:= _
"P:\Revenue Assurance\ascii.WAUK01.200
7", Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=Fals
e, Tab:=False, Semicolon:=False _
, Comma:=True, Space:=False, Other:=True, OtherChar:="|", FieldInfo:= _
Array(Array(1, 2), Array(2, 2), Array(3, 2), Array(4, 2), Array(5, 1), Array(6, 1), Array(7 _
, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1), Array _
(14, 1), Array(15, 1), Array(16, 1), Array(17, 1), Array(18, 1))
Range("HB1").Select
ActiveCell.FormulaR1C1 = "WAUK01"
Range("HB2").Select
ActiveCell.FormulaR1C1 = "WAUK01"
lastrow = Worksheets("ascii.WAUK01")
.Range("A1
").End(xlD
own).Row
With Worksheets("ascii.WAUK01")
.Range(" HB1:HB2").Select
Selection.AutoFill Destination:=Range("HB1:HB
" & lastrow&)
End With
ActiveWorkbook.SaveAs Filename:= _
"P:\Revenue Assurance\View1-WAUK01.xls
", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False
_
, CreateBackup:=False
Workbooks.OpenText Filename:= _
"P:\Revenue Assurance\ascii.WAUK02.200
7", Origin:= _
xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _
xlDoubleQuote, ConsecutiveDelimiter:=Fals
e, Tab:=False, Semicolon:=False _
, Comma:=True, Space:=False, Other:=True, OtherChar:="|", FieldInfo:= _
Array(Array(1, 2), Array(2, 2), Array(3, 2), Array(4, 2), Array(5, 1), Array(6, 1), Array(7 _
, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1), Array _
(14, 1), Array(15, 1), Array(16, 1), Array(17, 1), Array(18, 1))
Range("HB1").Select
ActiveCell.FormulaR1C1 = "WAUK02"
Range("HB2").Select
ActiveCell.FormulaR1C1 = "WAUK02"
lastrow = Worksheets("ascii.WAUK02")
.Range("A1
").End(xlD
own).Row
With Worksheets("ascii.WAUK02")
.Range(" HB1:HB2").Select
Selection.AutoFill Destination:=Range("HB1:HB
" & lastrow&)
End With
ActiveWorkbook.SaveAs Filename:= _
"P:\Revenue Assurance\View1-WAUK02.xls
", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False
_
, CreateBackup:=False
DoCmd.SetWarnings True
Exit_Command0_Click:
Exit Sub
Err_Command0_Click:
MsgBox Err.Description
Resume Exit_Command0_Click
End Sub
Start Free Trial