Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 735
Default SaveAs Type Problem

Hi All
Curious issue has arisen with xl2007 (SP1); I am creating a new workbook
based on a template file (xlt) that was created using xl2003 (SP3). The new
workbook is created and assigned to a workbook object wbTemp.Which I then
wish to save in xl2003 format.

I tried without success both of the following....

wbTemp.SaveAs Filename:="D:\Test.xls", FileFormat:=xlExcel9795

wbTemp.SaveAs "D:\Test.xls", xlExcel9795

When run it I get Run-time error 1004 - Method of 'SaveAs' of object
'_Workbook' failed

What is wrong?

PS if I remove the FileFormat parameter it works but of course the format
reverts to xl2007 with an xls extension!

--

Regards,
Nigel




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default SaveAs Type Problem

Maybe try

wbTemp.SaveAs Filename:="D:\Test", FileFormat:=xlExcel9795


--
__________________________________
HTH

Bob

"Nigel" wrote in message
...
Hi All
Curious issue has arisen with xl2007 (SP1); I am creating a new workbook
based on a template file (xlt) that was created using xl2003 (SP3). The
new workbook is created and assigned to a workbook object wbTemp.Which I
then wish to save in xl2003 format.

I tried without success both of the following....

wbTemp.SaveAs Filename:="D:\Test.xls", FileFormat:=xlExcel9795

wbTemp.SaveAs "D:\Test.xls", xlExcel9795

When run it I get Run-time error 1004 - Method of 'SaveAs' of object
'_Workbook' failed

What is wrong?

PS if I remove the FileFormat parameter it works but of course the format
reverts to xl2007 with an xls extension!

--

Regards,
Nigel






  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 735
Default SaveAs Type Problem

Hi Bob
I tried all combinations with and without the xls extension without success,
I tried file formats xlExcel8 as well as xlExcel9795 and still no joy, I
tried using the enumeration values for these 43 and 56 again without
success.

In desperation I recorded the file save process and modified as follows, it
now works.

wbTemp.SaveAs filename:=sTemp, FileFormat:=xlExcel8, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False

If I remove the parameters after FileFormat it fails. I thought these were
optional?

Cheers

--

Regards,
Nigel




"Bob Phillips" wrote in message
...
Maybe try

wbTemp.SaveAs Filename:="D:\Test", FileFormat:=xlExcel9795


--
__________________________________
HTH

Bob

"Nigel" wrote in message
...
Hi All
Curious issue has arisen with xl2007 (SP1); I am creating a new workbook
based on a template file (xlt) that was created using xl2003 (SP3). The
new workbook is created and assigned to a workbook object wbTemp.Which I
then wish to save in xl2003 format.

I tried without success both of the following....

wbTemp.SaveAs Filename:="D:\Test.xls", FileFormat:=xlExcel9795

wbTemp.SaveAs "D:\Test.xls", xlExcel9795

When run it I get Run-time error 1004 - Method of 'SaveAs' of object
'_Workbook' failed

What is wrong?

PS if I remove the FileFormat parameter it works but of course the format
reverts to xl2007 with an xls extension!

--

Regards,
Nigel







  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default SaveAs Type Problem

Hi Nigel

See also
http://www.rondebruin.nl/saveas.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Nigel" wrote in message ...
Hi All
Curious issue has arisen with xl2007 (SP1); I am creating a new workbook
based on a template file (xlt) that was created using xl2003 (SP3). The new
workbook is created and assigned to a workbook object wbTemp.Which I then
wish to save in xl2003 format.

I tried without success both of the following....

wbTemp.SaveAs Filename:="D:\Test.xls", FileFormat:=xlExcel9795

wbTemp.SaveAs "D:\Test.xls", xlExcel9795

When run it I get Run-time error 1004 - Method of 'SaveAs' of object
'_Workbook' failed

What is wrong?

PS if I remove the FileFormat parameter it works but of course the format
reverts to xl2007 with an xls extension!

--

Regards,
Nigel




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
SaveAs wk3 file type error message Ken Warthen[_2_] Excel Discussion (Misc queries) 1 December 9th 09 10:42 PM
problem:Structure with Object reference (TYPE...END TYPE) syswizard Excel Programming 6 February 16th 07 10:00 PM
SaveAs CSV problem pittur Excel Programming 2 June 16th 05 02:22 PM
Default SaveAs type... Jesterhoz[_2_] Excel Programming 8 March 16th 05 04:27 PM
SaveAs problem Jessi Excel Programming 2 July 31st 03 07:36 PM


All times are GMT +1. The time now is 11:04 PM.

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"