Refresh???

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
 
G

Guest

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.
 
H

hce

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
 
Top