Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS EXCEL / REFRESH DATA

Status
Not open for further replies.

scottcsherman

Programmer
Oct 9, 2002
14
0
0
US
I have a excel spreadsheet with about 20 pages. For 10 of the pages the data is brought in from a query from Access. Does anyone know of a way to get it to refresh all the worksheets at once, without clicking each worksheet and then clicking refresh data?

Thanks
Scott
scott_c_sherman@yahoo.com
 
Hi,

Try this...
RefreshAll Method
See Also Applies To Example Specifics
Refreshes all external data ranges and PivotTable reports in the specified workbook.

expression.RefreshAll

expression Required. An expression that returns a Workbook object.

Remarks
Objects that have the BackgroundQuery property set to True are refreshed in the background.

Example
This example refreshes all external data ranges and PivotTable reports in the third workbook.

Workbooks(3).RefreshAll

Skip,
Skip@TheOfficeExperts.com
 
Skip

Do you think this would work even though I'm not using Pivot Tables? I am populating cells from an access query that then populate an excel line / bar graph.

Thanks

Scott
 
there is a property on the external queries that refreshes the data when you open the spreed sheet. set this to yes.

You can do this by right clicking the data and editing the properties
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top