G
Guest
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
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