Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
macro which import alfa*.txt file, how to ?
Hi,
I need an help on how to make a macro getting any of the alfa*.txt from a directory (ex. alfa1.txt alfa2.txt etc etc) I used : With ActiveSheet.QueryTables.Add(Connection:="TEXT;C:\a lfa*.txt", _ Destination:=Range("C3")) ....but this didn't work. Is there a way to insert a jolly character instaed of * (star) ? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
macro which import alfa*.txt file, how to ?
sStr = dir("c:\alpha*.txt")
if sStr < "" then With ActiveSheet.QueryTables.Add(Connection:="TEXT;C:\" & sStr, _ Destination:=Range("C3")) . . . End With End if -- Regards, Tom Ogilvy "ss_era" wrote in message om... Hi, I need an help on how to make a macro getting any of the alfa*.txt from a directory (ex. alfa1.txt alfa2.txt etc etc) I used : With ActiveSheet.QueryTables.Add(Connection:="TEXT;C:\a lfa*.txt", _ Destination:=Range("C3")) ...but this didn't work. Is there a way to insert a jolly character instaed of * (star) ? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can I import text file of cash flow to excel file then use formula | Excel Discussion (Misc queries) | |||
macro-import another xls file | Excel Discussion (Misc queries) | |||
Skipping Import Text File dialog in a Macro | Excel Discussion (Misc queries) | |||
add nummeric and alfa to one alfanumeric number | Excel Discussion (Misc queries) | |||
Import text file without specifying a path macro won't work | Excel Programming |