Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello from Steved
Please how do I save a file name "missedtrips21-nov.xls" and save it as "missedtrips21-nov.csv" Ok the next day may be "missedtrips22-nov.xls" and the day after may be "missedtrips23-nov.xls" they need to be saved as "missedtrips22-nov.csv" and "missedtrips23-nov.csv" In closing it is a different file daily. I need the code to read the current file name and then save from xls to csv. Thankyou. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub Macro2()
' ' Macro2 Macro ' Macro recorded 1/16/2008 by Joel Warburg ' ' folder = ActiveWorkbook.Path bookname = ActiveWorkbook.Name bookname = Left(bookname, Len(bookname) - 3) bookname = folder & "\" & bookname & "cvs" ActiveWorkbook.SaveAs Filename:=bookname, _ FileFormat:=xlCSV, CreateBackup:=False End Sub "Steved" wrote: Hello from Steved Please how do I save a file name "missedtrips21-nov.xls" and save it as "missedtrips21-nov.csv" Ok the next day may be "missedtrips22-nov.xls" and the day after may be "missedtrips23-nov.xls" they need to be saved as "missedtrips22-nov.csv" and "missedtrips23-nov.csv" In closing it is a different file daily. I need the code to read the current file name and then save from xls to csv. Thankyou. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thankyou very much.
"Joel" wrote: Sub Macro2() ' ' Macro2 Macro ' Macro recorded 1/16/2008 by Joel Warburg ' ' folder = ActiveWorkbook.Path bookname = ActiveWorkbook.Name bookname = Left(bookname, Len(bookname) - 3) bookname = folder & "\" & bookname & "cvs" ActiveWorkbook.SaveAs Filename:=bookname, _ FileFormat:=xlCSV, CreateBackup:=False End Sub "Steved" wrote: Hello from Steved Please how do I save a file name "missedtrips21-nov.xls" and save it as "missedtrips21-nov.csv" Ok the next day may be "missedtrips22-nov.xls" and the day after may be "missedtrips23-nov.xls" they need to be saved as "missedtrips22-nov.csv" and "missedtrips23-nov.csv" In closing it is a different file daily. I need the code to read the current file name and then save from xls to csv. Thankyou. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excell2003 (SP-1) File > Save and File > Save As.. grayed out | Excel Discussion (Misc queries) | |||
Office 2003 - "autocomplete" in file | open or file | save no longer works | Excel Discussion (Misc queries) | |||
Excel marcos firing on file save as but not file save | Excel Programming | |||
Save File to Another Directory, but not change Users File Save location | Excel Programming | |||
Automate open file, update links, run macro, close and save file | Excel Programming |