Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Saving a newer version of Excel using an older version (Excel 97) | Excel Discussion (Misc queries) | |||
Suggestion : Please keep the latest version of Excel online at all | Excel Discussion (Misc queries) | |||
Excel latest XP version on new PC | Excel Discussion (Misc queries) | |||
Make Latest Version of Excel the Save as Default | Excel Discussion (Misc queries) | |||
Excel: Latest Version? | New Users to Excel |