Closed Thread
Results 1 to 2 of 2

Delete Rows from List Objects based on Conidtion

Hybrid View

  1. #1
    george-v
    Guest

    Delete Rows from List Objects based on Conidtion

    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

  2. #2
    Tom Ogilvy
    Guest

    RE: Delete Rows from List Objects based on Conidtion

    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

    --
    Regards,
    Tom Ogilvy


    "george-v" wrote:

    > 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


Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1