View Single Post
  #3   Report Post  
Ramius
 
Posts: n/a
Default

I've been looking through other posts and it looks like a lot of times it is
helpful when the code is included. I think the pertinent parts of the code
are as follows:

With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;D:\My Documents\capture.txt", Destination:=Range("A1"))
.Name = "CAPTURE"

where "D:\My Documents\capture.txt" is the location/file is recorded the
macro with.

"Ramius" wrote:

I recorded an Import External Data macro that I wish to use on other files.
It works beautifully, but only on that one specfic file in that one
directory. I can get the Visual Basic code for that macro to where I can
edit it, but don't know what to substitute for the directory/file so that the
macro is forced to ask.