Delete Rows from List Objects based on Conidtion

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

Guest

Only a part of code.

Set wrksht = ActiveWorkBook.WorkSheets("Query6")
Set objListobj=wrksht.ListObjects(1)
Set objListRows=objListobj.ListRows

I am getting an error message which says "subscripts out of range", Run time
error '9' at the second line of code shown above
 
Set wrksht = ActiveWorkBook.WorkSheets("Query6")
if wksheet.ListObject.count = 0 then
msgbox "No ListObject"
exit sub
end if
Set objListobj=wrksht.ListObjects(1)
Set objListRows=objListobj.ListRows
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top