LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default save as txt saves different tab, why???

hello

I have big workbook with many macros helping people to sort out some
complicated document. anyway last step after document has been edited, one
tab needs to be saved as txt file. I wrote a macro that does it (it is run
from a button on tab called 'summary'). tab that needs to be saved as txt is
called 'output'.
tab 'output' contains very long lines over 255 characters long.
problem is macro saves different tab sometimes and I have no idea why.
macro is simple and goes like that:

Dim fname '- define file name
fname = "cardex" & Mid(Worksheets("output").Range("a2"), 23, 8) & ".txt"

Dim cpath '-define path - range A7 contains path
cpath = Worksheets("summary").Range("a7")

Sheets("output").Select

ActiveWorkbook.SaveAs Filename:=cpath & fname, FileFormat:=xlText, _
CreateBackup:=False


any ideas greatly appreciated
 
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
Excel Saves Once only Phil G Excel Discussion (Misc queries) 2 August 30th 07 11:50 AM
What happens when Excel 07 saves? Cherry Black Excel Discussion (Misc queries) 3 August 23rd 07 06:05 PM
counting saves msfphish Excel Discussion (Misc queries) 2 March 28th 06 05:42 PM
when I save a file from Excel 2003 to cd it saves as read only mmjjmm Excel Worksheet Functions 1 February 14th 06 01:15 AM
Save As CSV saves empty rows Garrett Excel Discussion (Misc queries) 3 February 18th 05 12:18 AM


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