Odd Save As behavior
I have many files that I want to convert to Excel 2007 format "xlsx" (51) but
I am getting wierd results when creating a macro. The original file name is "3504043-2.XLS". '======Recorded macro in native text ActiveWorkbook.SaveAs Filename:= _ "M:\Qadocs\IPI'S\Test Folder\3504043-2.xlsx.XLS", FileFormat:=xlExcel8, _ Password:="", WriteResPassword:="2000", ReadOnlyRecommended:=False, _ CreateBackup:=False '====== Notice the file name creted by the macro!? "3504043-2.xlsx.XLS" The recorded macro does create the file exactly as typed. My macro works fine. (Thank you "Ron de Bruin") '====== If ActiveWorkbook.FileFormat < "51" Then ActiveWorkbook.SaveAs FileFormat:=51 ActiveWorkbook.Close Else ActiveWorkbook.Close SaveChanges:=False 'do nothing if suffix isn't "xls" End If '====== At this point, I am more curious than needing help. ;) (Allthough my doctors say the opposite). -- Regards VBA.Noob.Confused XP Pro Office 2007 |
All times are GMT +1. The time now is 04:08 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com