Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 213
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Default Behavior of Saving as Save As Charles Allen Excel Discussion (Misc queries) 10 June 4th 09 06:15 PM
Binary save - strange behavior J Austin Excel Discussion (Misc queries) 0 December 25th 08 10:28 PM
Excel workbook save behavior using VB6 very confusing Tony Girgenti Excel Programming 7 January 21st 08 03:03 PM
Auto run maco/change behavior of save/close m schmitz Excel Discussion (Misc queries) 0 February 10th 06 04:00 AM
Weird File Open/Save As Behavior [email protected] Excel Discussion (Misc queries) 0 December 9th 05 02:26 AM


All times are GMT +1. The time now is 12:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"