ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Renaming multiple files from *.csv to *.txt (https://www.excelbanter.com/excel-programming/327610-re-renaming-multiple-files-%2A-csv-%2A-txt.html)

keepITcool

Renaming multiple files from *.csv to *.txt
 

further to my earlier post:, some notes on OpenText see:

http://www.oaltd.co.uk/ExcelProgRef/...rogRefCh22.htm


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Richard Fuller wrote :

Unlike Excel 2000, which I used until the recent demise of my "old"
computer, Excel 2003 (WinXP) scrambles dates in *.csv files opened
with a VBA macro. The simple cure is to rename the *.csv files to
*.text before opening them with the Workbooks.OpenText method and
stipulate how the date string should be handled.

This is easy enough with only one file, but how can it be incorporated
with the GetOpenFilename(MultiSelect:=True)method? What I'd like to do
is have each selected file renamed to *.txt within the loop before it
is opened. I'd be forever grateful for some sample code to point me in
the right direction.

Here's the code I've been using for some years (called by the main
routine):



Richard Fuller

Renaming multiple files from *.csv to *.txt
 
Hi keepITcool,

Many thanks for your response, but the problem centred around a neat
means to rename *.csv files as text files - now cunningly solved by
Bob Phillips. However, I'm always glad to have more links to Excel
resources, so thanks for those, too.

All the best,

Richard Fuller


All times are GMT +1. The time now is 10:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com