![]() |
Save from exe file to csv file
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. |
Save from exe file to csv file
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. |
Save from exe file to csv file
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. |
All times are GMT +1. The time now is 05:32 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com