LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Change .txt file to .xls

I've been fighting this for a while. I'm trying to
convert a group of small text files (avg. 600 lines each)
in a folder to .xls files. All my attempts have failed.
Can someone lead me in the right direction on how to
convert at least one?

Sub ChangeExt()
Dim mytextfile As Object
Set mytextfile = GetObject("C:\Documents and
Settings\myfile.txt")
mytextfile.SaveAs "C:\Documents and Settings\myfile.xls"
End Sub

Thanks for any guidance you can provide.
Jason

 
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
how do I change a csv extension file to an xls file and use it? debby Excel Discussion (Misc queries) 1 February 7th 10 12:09 AM
2 users open same file and both can edit/change the file RANDY Excel Discussion (Misc queries) 1 January 24th 06 04:06 PM
How do I change *.CSV excel file to column seperated file? Pankaj Excel Discussion (Misc queries) 2 July 5th 05 07:35 PM
How to change a MS Word file to an Excel file Sameera Excel Worksheet Functions 1 June 28th 05 08:57 PM
How do I change file/open/"files of type" to default to "all file. How do I changefiles of type default Excel Discussion (Misc queries) 1 April 19th 05 10:45 PM


All times are GMT +1. The time now is 03:55 PM.

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

About Us

"It's about Microsoft Excel"