Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Error when opening a 2007 template saved in 2003 format from a mac

Okay, I will try and explain this as well as I can. I create reports for
dealerships and until last week, I was using Office 2003. My office has
recently upgraded, but most of the field dealerships are still using office
2003. I created my Macro to create the report and then save the file as an
..xls file, thinking it would be compatible. It unfortunately corrupts the
file when trying to read it on an office 03 machine. I have tried setting
the template up as an 03 document as well, but that failed epically. The
compatibility patch, while a WONDERFUL idea, is not an option as I have NO
pull in these dealerships and in no way control their actions (Also, most of
them can't even spell compatibility, much less install the patch). So I need
to know if it is even POSSABLE to save a file in 03 readable formats from a
macro. Anybody know?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Error when opening a 2007 template saved in 2003 format from a mac

Hi,

With the following Excel 2007 macro saved in the module of an Excel 2007
macro-enabled file, I can convert Excel 2007 workbooks to functional Excel
97-2003 workbooks. It may give you what you need, or at least demonstrate
that this conversion can be done in VBA.

Sub SaveAsOldExcel()
Const Error_ActionCanceled = 1004
Dim fullName As String
Dim k As Integer

With Application.FileDialog(msoFileDialogFilePicker)
If .Show Then
fullName = .SelectedItems(1)
Else
MsgBox "You didn't select a file to open."
Exit Sub
End If
End With
k = InStr(1, fullName, ".xlsx", vbTextCompare)
If k = 0 Then
MsgBox "The file selected does not have the .xlsx extension."
Exit Sub
End If
Workbooks.Open fullName
fullName = Left(fullName, Len(fullName) - 1)
With Workbooks(Workbooks.Count)
On Error Resume Next
.SaveAs Filename:=fullName, FileFormat:=xlExcel8, _
ReadOnlyRecommended:=False, _
CreateBackup:=False
If Err.Number = Error_ActionCanceled Then
MsgBox "Saving the file was canceled."
End If
On Error GoTo 0
.Close
End With
End Sub

--
Hope this helps,
Pesach Shelnitz


"Mover10" wrote:

Okay, I will try and explain this as well as I can. I create reports for
dealerships and until last week, I was using Office 2003. My office has
recently upgraded, but most of the field dealerships are still using office
2003. I created my Macro to create the report and then save the file as an
.xls file, thinking it would be compatible. It unfortunately corrupts the
file when trying to read it on an office 03 machine. I have tried setting
the template up as an 03 document as well, but that failed epically. The
compatibility patch, while a WONDERFUL idea, is not an option as I have NO
pull in these dealerships and in no way control their actions (Also, most of
them can't even spell compatibility, much less install the patch). So I need
to know if it is even POSSABLE to save a file in 03 readable formats from a
macro. Anybody know?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Error when opening a 2007 template saved in 2003 format from a

Thanks Pesach!

It wasn't EXACTLY what I was looking for, but it gave me the direction I
needed to go to get there and fix the problem. Thanks a million.

"Pesach Shelnitz" wrote:

Hi,

With the following Excel 2007 macro saved in the module of an Excel 2007
macro-enabled file, I can convert Excel 2007 workbooks to functional Excel
97-2003 workbooks. It may give you what you need, or at least demonstrate
that this conversion can be done in VBA.

Sub SaveAsOldExcel()
Const Error_ActionCanceled = 1004
Dim fullName As String
Dim k As Integer

With Application.FileDialog(msoFileDialogFilePicker)
If .Show Then
fullName = .SelectedItems(1)
Else
MsgBox "You didn't select a file to open."
Exit Sub
End If
End With
k = InStr(1, fullName, ".xlsx", vbTextCompare)
If k = 0 Then
MsgBox "The file selected does not have the .xlsx extension."
Exit Sub
End If
Workbooks.Open fullName
fullName = Left(fullName, Len(fullName) - 1)
With Workbooks(Workbooks.Count)
On Error Resume Next
.SaveAs Filename:=fullName, FileFormat:=xlExcel8, _
ReadOnlyRecommended:=False, _
CreateBackup:=False
If Err.Number = Error_ActionCanceled Then
MsgBox "Saving the file was canceled."
End If
On Error GoTo 0
.Close
End With
End Sub

--
Hope this helps,
Pesach Shelnitz


"Mover10" wrote:

Okay, I will try and explain this as well as I can. I create reports for
dealerships and until last week, I was using Office 2003. My office has
recently upgraded, but most of the field dealerships are still using office
2003. I created my Macro to create the report and then save the file as an
.xls file, thinking it would be compatible. It unfortunately corrupts the
file when trying to read it on an office 03 machine. I have tried setting
the template up as an 03 document as well, but that failed epically. The
compatibility patch, while a WONDERFUL idea, is not an option as I have NO
pull in these dealerships and in no way control their actions (Also, most of
them can't even spell compatibility, much less install the patch). So I need
to know if it is even POSSABLE to save a file in 03 readable formats from a
macro. Anybody know?

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
Excel 2007 error 'xx.xls cannot be saved in the current format' NK Excel Discussion (Misc queries) 0 May 21st 09 12:49 PM
Text box format missing when saved from 2007 to 2003 Itan Charts and Charting in Excel 1 December 4th 08 08:32 AM
Using Excel 2007 saved as 97-2003 alip Excel Discussion (Misc queries) 1 April 8th 08 12:20 AM
Document Not Saved Error Message - Excel 2003 glomonkey Excel Discussion (Misc queries) 1 January 25th 06 04:02 PM
Error when opening a saved worksheet Kim Excel Worksheet Functions 2 October 3rd 05 05:21 PM


All times are GMT +1. The time now is 06:51 AM.

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

About Us

"It's about Microsoft Excel"