Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 96
Default Convert Excel to text in VB6

How to save an Excel file to a Text using Visual basic 6.0
Can we get examples?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Convert Excel to text in VB6

Dim xlApp as Object
Dim xlBk as Object
set xlApp = CreateObject("Excel.Application")
set xlBk = xlApp.workbooks.Open("C:\My Folder\MyFile.xls")
On error resume next
kill "C:\My Folder\MyTextFile.CSV"
On Error goto 0
xlBk.SaveAs "C:\My Folder\MyTextFile.csv", 6 ' xlCSV = 6
xlbk.Close Savechanges:=False
set xlbk = Nothing
xlApp.Quit
set xlApp = Nothing

--
Regards,
Tom Ogilvy

"JT" wrote in message
...
How to save an Excel file to a Text using Visual basic 6.0
Can we get examples?

Thanks



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
How do I convert mun to text in excel mha Excel Worksheet Functions 3 April 1st 09 07:27 PM
convert text to number in excel The IC Teacher Excel Worksheet Functions 8 January 15th 08 07:59 PM
How do I convert a text array to a concatenated text cell? Excel. Vargasjc Excel Worksheet Functions 5 December 20th 06 06:35 PM
number convert to text in excel sugu Excel Discussion (Misc queries) 0 August 23rd 06 11:52 AM
Convert Excel to text Tom Ogilvy Excel Programming 3 July 15th 03 02:45 PM


All times are GMT +1. The time now is 01:30 PM.

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"