Hi!
I'm new to VB Script but I need some help.
I ran a macro in Excel to copy a text file to a sheet. It worked fine
I then proceded to copy the macro to a script but wehn I try to run it I get the compilation Error 800A03EE
Script: D:\Scrip_tables .vbs
Line: 14
Char: 49
Error: Expected ')'
Code: 800A03EE
Source: Microsoft VBscript compilation error
My script looks like this:
Any help is greatly appreciated
I'm new to VB Script but I need some help.
I ran a macro in Excel to copy a text file to a sheet. It worked fine
I then proceded to copy the macro to a script but wehn I try to run it I get the compilation Error 800A03EE
Script: D:\Scrip_tables .vbs
Line: 14
Char: 49
Error: Expected ')'
Code: 800A03EE
Source: Microsoft VBscript compilation error
My script looks like this:
Code:
Set objExcel = CreateObject("Excel.application")
Set objWorkbook = objExcel.Workbooks.open("C:\Amen\Tables.xls")
Do Until objExcel.cells(intRow, 1).value = " "
Set objExcel = CreateObject("Excel.application")
Set objWorkbook = objExcel.Workbooks.open("C:\Amen\Book1.xls")
'Location of last row
intRow = ActiveSheet.UsedRange.Row - 1 + ActiveSheet.UsedRange.Rows.Count
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;E:\AMENSOFT\pf\exadds.src-pf", Destination:=Range("A1"))
.Name = "exadds.src-pf_4"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 437
.TextFileStartRow = 1
.TextFileParseType = xlFixedWidth
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(9, 1, 9, 1, 1, 1)
.TextFileFixedColumnWidths = Array(11, 12, 5, 8, 4)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
Loop
Comment