Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Opening text files
Hello folks,
I have created a macro that opens several .txt files and saves them as excel. Is it possible to put code within the macro that will skip to the next txt file if the current txt file within the array is not in the folder yet (i.e. - not all txt files are copied to folder at once, they appear over time, I want to run the macro at specific times, even if all txt files are not there) Thanks, Jason |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Opening text files
set wbk = Nothing
On error resume next wb = Workbooks.Open( filename:=namearray(i)) On Error Resume Next if not wb is nothing then ' process text file. End if -- Regards, Tom Ogilvy "Jason" wrote in message ... Hello folks, I have created a macro that opens several .txt files and saves them as excel. Is it possible to put code within the macro that will skip to the next txt file if the current txt file within the array is not in the folder yet (i.e. - not all txt files are copied to folder at once, they appear over time, I want to run the macro at specific times, even if all txt files are not there) Thanks, Jason |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Opening text files | Excel Discussion (Misc queries) | |||
opening extensionless text files | Excel Discussion (Misc queries) | |||
Opening large text files | Excel Discussion (Misc queries) | |||
Opening and closing text files | Excel Programming | |||
Opening text files using macro | Excel Programming |