Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Saving Excel as latest version


I have an Excel 3.0 spreadsheet. I am using the following COM code to open the spreadsheet,
make a copy of the worksheet, rename both worksheets and save in my version of Excel
(Excel 2002).

xlApp.Workbooks.Open(txtSpreadsheet.Text, EmptyParam, True, EmptyParam,
EmptyParam, EmptyParam, EmptyParam, EmptyParam,
EmptyParam, EmptyParam, EmptyParam, EmptyParam,
EmptyParam, user);
xlSheet.ConnectTo(xlApp.Worksheets[1] as _Worksheet);
xlSheet.Copy(xlApp.Worksheets.Item[1]);
xlSheet.Name:='Sent';

xlSheet.ConnectTo(xlApp.Worksheets.Item[1] as _Worksheet);
xlSheet.Name:='Generic';

xlApp.DisplayAlerts[user]:=False;
xlApp.DefaultSaveFormat:=xlWorkbookNormal;
xlApp.ActiveWorkbook.Close(True,'NewName.xls', EmptyParam,user);
xlApp.DisplayAlerts[user]:=True;

The problem that I am having is that the active worksheet ('Sent') is being
renamed to 'NewName' before the save. I presume this is because it was originally
an Excel 3.0 spreadsheet. How can I get around this behaviour?

Nirmal
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
Saving a newer version of Excel using an older version (Excel 97) Alain Dekker Excel Discussion (Misc queries) 7 April 3rd 10 11:02 PM
Suggestion : Please keep the latest version of Excel online at all Mr. Low Excel Discussion (Misc queries) 0 September 15th 07 02:46 AM
Excel latest XP version on new PC Andy Excel Discussion (Misc queries) 1 December 29th 06 07:43 PM
Make Latest Version of Excel the Save as Default Diggsy Excel Discussion (Misc queries) 4 November 14th 06 09:41 PM
Excel: Latest Version? Rodney New Users to Excel 6 May 7th 05 07:10 PM


All times are GMT +1. The time now is 12:08 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"