• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Listobject:Getting subscript out of range error

Sudha79

New Member
I am getting subscript out of range error on this line of code. NOTE: I have declared "lo" as Listobject. And also autofilter On in the sheet.
Set lo = TargetWb.ListObjects(1)

Please help me what could be issue here.

Thanks
Sudha
 
Hi Please find here the error screenshot.
I cannot share complete macro file due to privacy reasons.

Thanks
Sudha
 

Attachments

  • Error_Macro.JPG
    Error_Macro.JPG
    78.1 KB · Views: 10
That error would imply that you don't have a table on the sheet. (Adding an autofilter does not create a table)
 
That error would imply that you don't have a table on the sheet. (Adding an autofilter does not create a table)
Ok...Got it resolved by using someother code, but would like to know how the list objects can be used?
Having just the table of data will be taken as list object? Please let me know.
 
You need to apply Excel structured table to data range. Usually found in home tab of ribbon menu.
 
Back
Top