Is there a way of eliminating an entire row from an excel file.Thanks
Printable View
Is there a way of eliminating an entire row from an excel file.Thanks
Delete row 4...
VB Code:
Rows("4:4").Select Selection.Delete Shift:=xlUp
The code offered by RobDog888 as follows
Vb code:
Rows("4:4").select
Selection.Delete Shift:=x1Up
desn't work.Gives error : x1Up variable not defined. Furthermore, I need to delete a row generated inside a code. For example : delete row n ( not a number) from Sheet.application.worksheets("any name"). Help!! Thank you
What version are you running? My code works in Excel 2000 +
VB Code:
Const xlUp = -4162 (&HFFFFEFBE)
Um you haven't specified whether you are running in excel or Vb...
Either way, assuming you have a reference to the sheet used (deletes the fourth row):
VB Code:
sht.rows(4).delete
Vince