I'm very very new at this. I'm trying to create a vbscript that will open
an Excel 2003 file and delete all rows above 9. This is the code I came up
with.
Set objExcel = CreateObject("Excel.Application")
Set objWorkbook =
objExcel.Workbooks.Open("D:\ServerFiles\CroftDB\DbImport\dbaum.xls")
rows(9).Offset(-x).Resize(x).delete
objExcel.Quit
The error message I'm getting says Line 4.
Type Mismatch: 'rows'
Code: 800A000D
I Googled the code number and I didn't understand most of what I'm reading.
Please help a very newbie out. I just want to delete all rows above 9 in
Sheet1. This VBScript is running on my Win2003 server and I'm using Excel
2003.
Thanks in advance.
Phil
an Excel 2003 file and delete all rows above 9. This is the code I came up
with.
Set objExcel = CreateObject("Excel.Application")
Set objWorkbook =
objExcel.Workbooks.Open("D:\ServerFiles\CroftDB\DbImport\dbaum.xls")
rows(9).Offset(-x).Resize(x).delete
objExcel.Quit
The error message I'm getting says Line 4.
Type Mismatch: 'rows'
Code: 800A000D
I Googled the code number and I didn't understand most of what I'm reading.
Please help a very newbie out. I just want to delete all rows above 9 in
Sheet1. This VBScript is running on my Win2003 server and I'm using Excel
2003.
Thanks in advance.
Phil