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: 312
Default Save sht as text file - problem

Hi everyone. I have the below chunk of code that saves a single sheet in my
workbook as a text file. Row 1 of the excel file is very long (300+
characters). When the code runs, it truncates the contents of row 1 (don't
know how many characters - I just know all of the contents are not in the
text file). BUT, when I manually copy the contents of the excel sheet, and
past them into Notebook and save as a .txt file, all the contents of row 1
are there. Any idea why this is happening, and how I can fix it? Thanks!

Dim sh As Worksheet
Set sh = Worksheets("Sheet1")
sh.Copy
ActiveWorkbook.SaveAs Filename:="c:\Testfile.txt", FileFormat:=xlText


 
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 you save an excel file to be read as IBM-type text file ? Dee Franklin Excel Worksheet Functions 2 October 10th 06 02:46 AM
Save CSV file as Pipe delimited text file germantim Excel Discussion (Misc queries) 3 August 16th 06 09:52 AM
How can I save a file as a comma-delimited text file in Excel? LAM Excel Discussion (Misc queries) 1 May 3rd 05 10:24 PM
Excel VBA - open text file, replace text, save file? Cybert Excel Programming 2 October 2nd 04 01:05 AM
Save As - Multiple Sheets fails to save as text file Ravee Srinivasan Excel Programming 2 November 10th 03 04:05 PM


All times are GMT +1. The time now is 01:33 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"