I'm trying to use a variable to import a text file. Is it possible to change the path and filename below to a variable? I would like to change "L:\GEAM Data.txt" to a variable "fname", which a user previously entered using Application.GetOpenFilename.
With ActiveSheet.QueryTables.Add _ (Connection:="TEXT;L:\GEAM Data.txt", _ Destination:=Range("A1"))
Any help would be greatly appreciated as I've tried every syntax combination I could think of.