D
Dennis
I'm trying to write a vb script to open a workbook and just remove the first
row. I need it to remove the row and shift everything up, not just delete the
cell contents.
I recirded a macro of the actcion and then just copied the VB code from the
editor into my script. But when I run it I get and error code 800A0400 at
line 5 char 24.it s the xlup statement. here is the actual script.
Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open("C:\book1.xls")
objExcel.Visible = TRUE
Rows("1:1").Select
Selection.Delete Shift:=xlUp
row. I need it to remove the row and shift everything up, not just delete the
cell contents.
I recirded a macro of the actcion and then just copied the VB code from the
editor into my script. But when I run it I get and error code 800A0400 at
line 5 char 24.it s the xlup statement. here is the actual script.
Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open("C:\book1.xls")
objExcel.Visible = TRUE
Rows("1:1").Select
Selection.Delete Shift:=xlUp