none
Run macro after ListObject.QuaryTable.Refresh RRS feed

Answers

  • Thanks for your ansver. At the end i found a solution, which I see as quite easy. the code is below.

    Sub Test1()
    Dim wrksht As Worksheet
    Dim oListObj As ListObject
    
    Set wrksht = ActiveWorkbook.Worksheets("List1")
    Set oListObj = wrksht.ListObjects(1)
    
      oListObj.QueryTable.Refresh BackgroundQuery:=False
      MsgBox "hot"
     End Sub


    VALL2

    • Marked as answer by VALL2 Tuesday, August 28, 2012 8:07 AM
    Tuesday, August 28, 2012 8:06 AM

All replies

  • http://social.technet.microsoft.com/Forums/en-US/excel/thread/05f7a7e6-b24f-4cb6-8303-ca1ae6a4c21c

    You can check the links of above post.Although that is based on web query it can be implemented for any query table.

    There you will find a sample file.Try study this and if still the issue resolved,pls share the file where query table present I shall incude necessary modules...

    Basically all query table is based on similar structure.Only the connection parameter changes.Sometimes it is WWW,Text,ODBC,OLE.....

     


    Best Regards,
    Asadulla Javed, Kolkata
    ---------------------------------------------------------------------------------------------
    Please do not forget to click “Vote as Helpful” if any post helps you and "Mark as Answer”if it solves the issue.

    Wednesday, August 22, 2012 12:23 PM
    Answerer
  • Thanks for your ansver. At the end i found a solution, which I see as quite easy. the code is below.

    Sub Test1()
    Dim wrksht As Worksheet
    Dim oListObj As ListObject
    
    Set wrksht = ActiveWorkbook.Worksheets("List1")
    Set oListObj = wrksht.ListObjects(1)
    
      oListObj.QueryTable.Refresh BackgroundQuery:=False
      MsgBox "hot"
     End Sub


    VALL2

    • Marked as answer by VALL2 Tuesday, August 28, 2012 8:07 AM
    Tuesday, August 28, 2012 8:06 AM