Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to save worksheet
I need help writing a macro that I can place in a .xlt file.
The .xlt file is modified and saved as a .xls file.The macro will allow me to automatically save a worksheet from the workbook as a tab delimited text file with the same name as the .xls file without prompting for a file name Current macro that I am using is: ChDir "C:\Documents and Settings\My Documents\ ActiveWorkbook.SaveAs Filename:= "C:\Documents and Settings\My Documents\" & InputBox("File Name ?"), FileFormat:=xlText, CreateBackup:=Fals Thank |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to save worksheet
If this lcase(thisworkbook.name,4) = ".xls" then
ChDir "C:\Documents and Settings\My Documents\" ActiveWorkbook.SaveAs Filename:= _ "C:\Documents and Settings\My Documents\" & _ application.Substitute(thisworkbook.name,".xls",". txt"), _ FileFormat:=xlText, CreateBackup:=False End if -- Regards, Tom Ogilvy "RSVP" wrote in message ... I need help writing a macro that I can place in a .xlt file. The .xlt file is modified and saved as a .xls file.The macro will allow me to automatically save a worksheet from the workbook as a tab delimited text file with the same name as the .xls file without prompting for a file name. Current macro that I am using is: ChDir "C:\Documents and Settings\My Documents\" ActiveWorkbook.SaveAs Filename:= _ "C:\Documents and Settings\My Documents\" & InputBox("File Name ?"), _ FileFormat:=xlText, CreateBackup:=False Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to save worksheet
Tom
Problem solved, thanks for the assist. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How write Macro to save worksheet to a RELATIVE address | Excel Discussion (Misc queries) | |||
Save Macro and Custom Toolbar in Worksheet | Excel Discussion (Misc queries) | |||
macro save a file name from a cell in 1st worksheet | Excel Discussion (Misc queries) | |||
Worksheet Buttons (Save, Save As, Cut, Paste, etc.) Not Working | Excel Worksheet Functions | |||
using macro to save worksheet with unique file name | Excel Programming |