Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Default Behavior of Saving as Save As | Excel Discussion (Misc queries) | |||
Binary save - strange behavior | Excel Discussion (Misc queries) | |||
Excel workbook save behavior using VB6 very confusing | Excel Programming | |||
Auto run maco/change behavior of save/close | Excel Discussion (Misc queries) | |||
Weird File Open/Save As Behavior | Excel Discussion (Misc queries) |