Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I've been trying to figure this out all weekend, but I'm kinda stuck. I would like to open some text files in excel, copy some info into another worksheet, then open another text file. But I have to be order specific. So the first file is plate1.txt, then open plate2.txt, and so on. Any advice would be greatly appreciated, jon |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
dim iCtr as long
dim myFileName as string for ictr = 1 to 10 'whatever??? myfilename = "C:\my documents\excel\plate" & ictr & ".txt" 'your code to open and process and close next ictr Jay Noname wrote: Hi, I've been trying to figure this out all weekend, but I'm kinda stuck. I would like to open some text files in excel, copy some info into another worksheet, then open another text file. But I have to be order specific. So the first file is plate1.txt, then open plate2.txt, and so on. Any advice would be greatly appreciated, jon -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
you can do this in a loop
eg (untested) dim x as integer dim sDir as string sDir="C:\datafiles\" x=1 do while dir(sDir & "plate" & x & ".txt") <"" 'process file here x=x+1 loop Tim "Jay Noname" wrote in message ups.com... Hi, I've been trying to figure this out all weekend, but I'm kinda stuck. I would like to open some text files in excel, copy some info into another worksheet, then open another text file. But I have to be order specific. So the first file is plate1.txt, then open plate2.txt, and so on. Any advice would be greatly appreciated, jon |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thanks for the advice,
I'll give them a go this morning and let you know how it works out jon |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Consecutive date range on consecutive worksheets | Excel Worksheet Functions | |||
Opening files | Excel Discussion (Misc queries) | |||
show most recent files first when opening excel files | Excel Discussion (Misc queries) | |||
Opening Quattro Pro for Windows files (*.WB1 Files) using Excel 20 | Excel Discussion (Misc queries) | |||
How can I view files chronologically when opening multiple files | Excel Discussion (Misc queries) |