ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro to Open the Menu Data,Refresh Data,filename,import (https://www.excelbanter.com/excel-programming/353060-macro-open-menu-data-refresh-data-filename-import.html)

Bob

Macro to Open the Menu Data,Refresh Data,filename,import
 
When recording a macro I am trying to open the Data Menu, select Refresh Data
a box opens you have to chose the file and Import. I want the code to have
the file name so it will import automatically without having to choose the
file each time.
This is the code now:
Selection.QueryTable.Refresh BackgroundQuery:=False
How do I put what file opens every time?

Thank you for your help,
Bob


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

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