ParanoidAndroid
Board Regular
- Joined
- Jan 24, 2011
- Messages
- 50
Hi All
I use the following to delete a row in a table
Range("A" & x).Select
Selection.ListObject.ListRows(x-1).Delete
How do I get this to apply to multiple sheets? I have problem with the ws in following line ws.Range("A" & x).Select. I suppose I could omit that line altogether except i dont know how to define the .listobject ie. .listobject(*)
Your assistance will be greatly appreciated as im stuck grrrr
Note: this is a simplified version of my code
I use the following to delete a row in a table
Range("A" & x).Select
Selection.ListObject.ListRows(x-1).Delete
How do I get this to apply to multiple sheets? I have problem with the ws in following line ws.Range("A" & x).Select. I suppose I could omit that line altogether except i dont know how to define the .listobject ie. .listobject(*)
Code:
Sub Del_Row_in_Table
For each ws in sheets(array("sheet1", "sheet2", "sheet3"))
ws.Range("A3").Select
ws.Selection.ListObject.ListRows(2).Delete
next ws
end sub
Your assistance will be greatly appreciated as im stuck grrrr
Note: this is a simplified version of my code
Last edited: