Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting rows based upon Error conditions
I am trying to delete rows based upon catching the #REF! error. I am using
the following code; Case CVErr(xlErrRef) xlApp.Workbooks("CPCT Dec CDART.xls").Worksheets(ShtRef).Rows(RowNdx, "H").Delete I am deleting the row in the spreadsheet using the select case method to trap the various types of errors. When it gets to the row in column "H", my code breaks at the code listed above. Any ideas? JEff |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting rows based upon Error conditions
Jeff,
"Rows" only takes a long index: xlApp.Workbooks("CPCT Dec CDART.xls"). _ Worksheets(ShtRef).Rows(RowNdx).Delete Otherwise, you would use the Cells property xlApp.Workbooks("CPCT Dec CDART.xls").Worksheets(ShtRef).Cells(RowNdx, "H").EntireRow.Delete HTH, Bernie MS Excel MVP "JEff" wrote in message ... I am trying to delete rows based upon catching the #REF! error. I am using the following code; Case CVErr(xlErrRef) xlApp.Workbooks("CPCT Dec CDART.xls").Worksheets(ShtRef).Rows(RowNdx, "H").Delete I am deleting the row in the spreadsheet using the select case method to trap the various types of errors. When it gets to the row in column "H", my code breaks at the code listed above. Any ideas? JEff |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Deleting Rows based on a Value | Excel Worksheet Functions | |||
Deleting a range of rows based on a variable; syntax error | Excel Discussion (Misc queries) | |||
Deleting rows based on a cell value | Excel Worksheet Functions | |||
Deleting rows based upon the value in column D | Excel Programming | |||
Deleting rows based on criteria | Excel Programming |