Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change file name - remove specific text
Newbie, so please be gentle...
I have a macro that runs a macro across multiple CSV files in a folder, makes formating changes, then renames the file (adds "_ADS"), converts it to an XLS and saves to a different directory. Everything works great, except that in keeping the workbook name, it keeps the .csv in the file name (example filename.csv.xls. This can sometimes exceed the 31 limit. Here's the renaming, converting and saving code: Sheets("Sheet2").Name = ActiveWorkbook.Name ActiveWorkbook.SaveAs Filename:="C:\Documents and Settings\User\Desktop\Ads\" & ActiveWorkbook.Name & "_ADS" & ".xls", _ FileFormat:=xlWorkbookNormal, ReadOnlyRecommended:=False, _ CreateBackup:=False Is there a way to remove the ".csv" from the workbook name during renaming, converting? sorry if this is basic, but I am just getting started with macros. Thanks, Chris |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need to remove text in specific place | Excel Worksheet Functions | |||
Remove specific text from a column of cells | Excel Discussion (Misc queries) | |||
Remove Specific Text - HELP! | Excel Worksheet Functions | |||
Remove or change password protected excel file | Excel Discussion (Misc queries) | |||
How do I remove all text in a cell after a specific character? | Excel Worksheet Functions |