VB Sctipt to remove row

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a vb script written to just open a workbook and remove the first row.
I need it to remove the row not just delete the cell contents. here is the
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

I keep getting an error on line 5 char 24. Is there a different tag I should
be using?
 
Dennis, try this
Rows("1:1").Delete
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 2003
 
Back
Top