View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Bob is offline
external usenet poster
 
Posts: 972
Default 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