Macro to Refresh External data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Good afternoon,

I try to record a macro to refresh external data but the macro recorder does
not give me anything once I refresh the query and stop the recording.
Does anyone knows why?
Or better if you know the VBA to make this happen -even when the data sheet
is hidden- let me know.

Thanks in advance and greetings from south Fla.
 
Apprentice,

This is the code the recorder generated when I tried a refresh on a text file import.

Range("A1").Select
Selection.QueryTable.Refresh BackgroundQuery:=False

You'd probably change it to something like:

Range("A1").QueryTable.Refresh BackgroundQuery:=False
--
Earl Kiosterud
www.smokeylake.com

Note: Some folks prefer bottom-posting. But if you bottom-post to a reply that's already
top-posted, the thread gets messy. When in Rome...
 
Back
Top