Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Trying to save as tab delimited

Hi,
I have Excel 2000 on Win 2000 and I am trying to save the active
worksheet as a tab delimited file. This is what I've tried:
Dim i As Integer
Dim ws As Worksheet

ws = ActiveWorkbook.SaveAs("13031t.txt", xlTextWindows)

But I keep getting an error on the "Saveas" saying it needs a valid
function. So how do I do this?

Also, what is the file format for a tab delim file? Excel VBA help
does not say, it just lists the file format constants.

Thanks

--
Say no to fixed width tables. They look terrible in all browsers.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Trying to save as tab delimited

The Workbook SaveAs method does not return a worksheet. Try:

ActiveWorkbook.SaveAs "13031t.txt", xlTextWindows


--
Jim Rech
Excel MVP


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Trying to save as tab delimited

But I wonder why with the parentheses

In VB when you using a returned result you use parens, else not:

Dim WB as Workbook
Set WB = Workbooks.Open("MyBook.xls")

or

Workbooks.Open "MyBook.xls"

--
Jim Rech
Excel MVP


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 can I save a 40meg 26,000 row file to Space Delimited format Thanks - KVH Excel Discussion (Misc queries) 1 October 31st 08 04:56 PM
Save file as semi-colon delimited? Colin Hayes Excel Worksheet Functions 2 April 22nd 08 08:21 AM
how do i save an excel file as a non-delimited, non-packed fixed jthisdell Excel Discussion (Misc queries) 1 August 29th 06 01:27 PM
Unwanted Quotations Marks in Save as Tab Delimited File Don Excel Discussion (Misc queries) 3 January 30th 06 05:12 AM
How do I save format changes in a comma delimited file? mariam0673 Excel Worksheet Functions 2 March 1st 05 05:37 PM


All times are GMT +1. The time now is 04:13 AM.

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"