+ Reply to Thread
Results 1 to 4 of 4

ActiveWorkbook.RefreshAll

  1. #1
    Matt Cromer
    Guest

    ActiveWorkbook.RefreshAll

    I would like to gve the RefreshAll 5 seconds to complete before performing
    the next actions. Is this possible?

    Thanks

    ActiveWorkbook.RefreshAll

    Sheets("Data").Select
    Sheets("Data").Copy
    Cells.Select
    Selection.Copy
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
    SkipBlanks _
    :=False, Transpose:=False


  2. #2
    Tom Ogilvy
    Guest

    re: ActiveWorkbook.RefreshAll

    why not set up your queries so they don't query in the background -- then you
    shouldn't need to worry about it.

    --
    Regards,
    Tom Ogilvy


    "Matt Cromer" wrote:

    > I would like to gve the RefreshAll 5 seconds to complete before performing
    > the next actions. Is this possible?
    >
    > Thanks
    >
    > ActiveWorkbook.RefreshAll
    >
    > Sheets("Data").Select
    > Sheets("Data").Copy
    > Cells.Select
    > Selection.Copy
    > Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
    > SkipBlanks _
    > :=False, Transpose:=False
    >


  3. #3
    Matt Cromer
    Guest

    re: ActiveWorkbook.RefreshAll

    Tom -

    That sound great, how do I set up the query (there is actually only one) to
    not run in the background?

    "Tom Ogilvy" wrote:

    > why not set up your queries so they don't query in the background -- then you
    > shouldn't need to worry about it.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    > "Matt Cromer" wrote:
    >
    > > I would like to gve the RefreshAll 5 seconds to complete before performing
    > > the next actions. Is this possible?
    > >
    > > Thanks
    > >
    > > ActiveWorkbook.RefreshAll
    > >
    > > Sheets("Data").Select
    > > Sheets("Data").Copy
    > > Cells.Select
    > > Selection.Copy
    > > Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
    > > SkipBlanks _
    > > :=False, Transpose:=False
    > >


  4. #4
    Tom Ogilvy
    Guest

    re: ActiveWorkbook.RefreshAll

    Edit the query and there should be an option for that in the dialog.

    An alternative is to just have your refresh command insure a foreground
    query.

    Activesheet.QueryTables(1).Refresh Backgroundquery:=False

    RefreshAll doesn't have that argument.

    --
    Regards,
    Tom Ogilvy


    "Matt Cromer" wrote:

    > Tom -
    >
    > That sound great, how do I set up the query (there is actually only one) to
    > not run in the background?
    >
    > "Tom Ogilvy" wrote:
    >
    > > why not set up your queries so they don't query in the background -- then you
    > > shouldn't need to worry about it.
    > >
    > > --
    > > Regards,
    > > Tom Ogilvy
    > >
    > >
    > > "Matt Cromer" wrote:
    > >
    > > > I would like to gve the RefreshAll 5 seconds to complete before performing
    > > > the next actions. Is this possible?
    > > >
    > > > Thanks
    > > >
    > > > ActiveWorkbook.RefreshAll
    > > >
    > > > Sheets("Data").Select
    > > > Sheets("Data").Copy
    > > > Cells.Select
    > > > Selection.Copy
    > > > Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
    > > > SkipBlanks _
    > > > :=False, Transpose:=False
    > > >


+ 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