Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening text files Sandy5590 Excel Discussion (Misc queries) 0 October 15th 09 04:35 PM
opening extensionless text files T Magritte Excel Discussion (Misc queries) 2 July 23rd 08 07:54 PM
Opening large text files freekrill Excel Discussion (Misc queries) 6 September 7th 05 04:44 AM
Opening and closing text files Vince[_3_] Excel Programming 1 August 11th 03 09:43 PM
Opening text files using macro Ron de Bruin Excel Programming 0 July 9th 03 02:49 PM


All times are GMT +1. The time now is 03:21 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"