+ Reply to Thread
Results 1 to 7 of 7

refresh

Hybrid View

  1. #1
    Registered User
    Join Date
    11-18-2007
    Posts
    29

    refresh

    Sub zrefresh()
    Sheets Array("a", "b", "c", "d").Select
    Selection.QueryTable.Refresh BackgroundQuery:=True
    End Sub
    can i know what wrong with my code
    Last edited by sungpeng; 12-20-2007 at 01:45 AM.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    sungpeng

    1) Can you please edit your post to wrap your code as per the forum rules.

    2) Not sure about the query part but change
    Sheets Array("a", "b", "c", "d").Select
    to
    Sheets(Array("a", "b", "c", "d")).Select
    for the grouping.


    rylo

  3. #3
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    sungpeng

    Please read forum rules & wrap your VBA code

    A thread with the rules is available at the top of each forum or see links below

    If you do not understand the VBA code wrap instructions have a look at my last reply in this thread
    http://www.excelforum.com/showthread.php?t=583950
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  4. #4
    Registered User
    Join Date
    11-18-2007
    Posts
    29
    how to edit my post to wrap my code

  5. #5
    Registered User
    Join Date
    11-18-2007
    Posts
    29
    Sub zrefresh()
    Sheets(Array("a", "b", "c", "d", "e", "f", "g", "h", "i", "j")).Select
    Selection.QueryTable.Refresh BackgroundQuery:=True
    End Sub
    i want to refresh and import data from web. can i know why is it not working
    thank

  6. #6
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    sungpeng

    1) Go back to your original post, select the edit key, highlight the code, then press the # button. This will wrap your code.

    2) What is the error message you are getting?


    rylo

  7. #7
    Registered User
    Join Date
    11-18-2007
    Posts
    29
    run-time error '1004':
    Application-defined or object-defined error

+ Reply to 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