keith05281967
Board Regular
- Joined
- May 6, 2011
- Messages
- 68
Hello Coders,
I have an excel workbook "Actionable.XYZ.xlsx"
line 2 of the below code successfully removes Actionable." from the file name.
line 3 successfully maps the path "C:\Documents\Test_Folder" where the file currently resides.
What I want line 4 to do is save the workbook with the updated name in the current directory as a .xls file.
This is what I want: "C:\Documents\Test_Folder\XYZ.xls"
What i'm getting: "C:\Documents\Some_Other_Folder\XYZ.xlsx"
wrong directory, wrong extension, right file name.
1. sFile = ActiveWorkbook.Name
2. sFile = Replace(sFile, "Actionable.", "")
3. sPath = ThisWorkbook.Path
'save as .xls format
4. ActiveWorkbook.SaveAs sFile, FileFormat:=56
Excel 07
thanks,
keith
I have an excel workbook "Actionable.XYZ.xlsx"
line 2 of the below code successfully removes Actionable." from the file name.
line 3 successfully maps the path "C:\Documents\Test_Folder" where the file currently resides.
What I want line 4 to do is save the workbook with the updated name in the current directory as a .xls file.
This is what I want: "C:\Documents\Test_Folder\XYZ.xls"
What i'm getting: "C:\Documents\Some_Other_Folder\XYZ.xlsx"
wrong directory, wrong extension, right file name.
1. sFile = ActiveWorkbook.Name
2. sFile = Replace(sFile, "Actionable.", "")
3. sPath = ThisWorkbook.Path
'save as .xls format
4. ActiveWorkbook.SaveAs sFile, FileFormat:=56
Excel 07
thanks,
keith