Refresh???

  • Thread starter Thread starter hce
  • Start date Start date
H

hce

Hi

I know that to refresh an active workbook, the command is
Activeworkbook.RefreshAll. But could someone teach me how I can refresh
only the active worksheet...? I tried various permutations of
Activeworkbook.RefreshAll but they all failed... Can someone be so kind
to help?

Cheers
kelvin
 
hi,
Try this:
Sheets1.select
Range("where the query is").select
selection.querytable.refresh backgroundquery:=false

backgroundquery:=false will prevent code from excuting
until the query has finished refreshing.
 
hi

thanks for your help but i think i forgot to mention that i want t
refresh pivot tables that are present in the worksheet... there coul
be more than one pivot table in one worksheet... do you know of a wa
to do this?

cheer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top