ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Refreshing an Excel Query (https://www.excelbanter.com/excel-discussion-misc-queries/178667-refreshing-excel-query.html)

DWIGHTBALLMORRILL

Refreshing an Excel Query
 
Is there a way to setup a Query to automatically refresh when you open it up?


FSt1

Refreshing an Excel Query
 
hi
Private Sub Workbook_Open()
Sheets("sheet1").Range("A1").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
End Sub
edit the range address to suit your data.

regards
FSt1

"DWIGHTBALLMORRILL" wrote:

Is there a way to setup a Query to automatically refresh when you open it up?




All times are GMT +1. The time now is 02:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com