Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have an excel workbook with multiple sheets. I want to save one of
the sheets as a WK4 in the background. I amusing the following code: Sheets("sheetx").SaveAs Filename:= "C:\xxx.wk4", FileFormat:=xlWK4, CreateBackup:=False The problem is that although the excel appears to still be open with all of the tabs, it has been renamed at the top to the WK4 filename. If I close the excel and open the WK4 then it opens as WK4 with only the sheet that I saved. My problem is that users may have an issue with the excel being "lost" while the supposed WK4 file looks like excel. SaveCopyAs does not seem to help because that cannot be done against a single sheet and cannot convert to WK4. Any ideas about how I could do a SaveAs only in the background without renaming the excel? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 'create newwork book with copy of sheetx Sheets("sheet1").Copy ActiveWorkbook.SaveAs Filename:="C:\temp\abc.wk4", FileFormat:=xlWK4, _ CreateBackup:=False ActiveWorkbook.Close "Edward" wrote: I have an excel workbook with multiple sheets. I want to save one of the sheets as a WK4 in the background. I amusing the following code: Sheets("sheetx").SaveAs Filename:= "C:\xxx.wk4", FileFormat:=xlWK4, CreateBackup:=False The problem is that although the excel appears to still be open with all of the tabs, it has been renamed at the top to the WK4 filename. If I close the excel and open the WK4 then it opens as WK4 with only the sheet that I saved. My problem is that users may have an issue with the excel being "lost" while the supposed WK4 file looks like excel. SaveCopyAs does not seem to help because that cannot be done against a single sheet and cannot convert to WK4. Any ideas about how I could do a SaveAs only in the background without renaming the excel? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On May 8, 11:53*am, Joel wrote:
'create newwork book with copy of sheetx Sheets("sheet1").Copy ActiveWorkbook.SaveAs Filename:="C:\temp\abc.wk4", FileFormat:=xlWK4, _ * CreateBackup:=False ActiveWorkbook.Close "Edward" wrote: I have an excel workbook with multiple sheets. *I want to save one of the sheets as a WK4 in the background. *I amusing the following code: Sheets("sheetx").SaveAs Filename:= "C:\xxx.wk4", FileFormat:=xlWK4, CreateBackup:=False The problem is that although the excel appears to still be open with all of the tabs, it has been renamed at the top to the WK4 filename. If I close the excel and open the WK4 then it opens as WK4 with only the sheet that I saved. *My problem is that users may have an issue with the excel being "lost" while the supposed WK4 file looks like excel. SaveCopyAs does not seem to help because that cannot be done against a single sheet and cannot convert to WK4. Any ideas about how I could do a SaveAs only in the background without renaming the excel?- Hide quoted text - - Show quoted text - This makes new problems. I do not want to close the original document, just export one of its sheets in the background. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I don't think it will close the original. Th ecopy will create a new
workbook and become the activeworksheet. The original should remain open. "Edward" wrote: On May 8, 11:53 am, Joel wrote: 'create newwork book with copy of sheetx Sheets("sheet1").Copy ActiveWorkbook.SaveAs Filename:="C:\temp\abc.wk4", FileFormat:=xlWK4, _ CreateBackup:=False ActiveWorkbook.Close "Edward" wrote: I have an excel workbook with multiple sheets. I want to save one of the sheets as a WK4 in the background. I amusing the following code: Sheets("sheetx").SaveAs Filename:= "C:\xxx.wk4", FileFormat:=xlWK4, CreateBackup:=False The problem is that although the excel appears to still be open with all of the tabs, it has been renamed at the top to the WK4 filename. If I close the excel and open the WK4 then it opens as WK4 with only the sheet that I saved. My problem is that users may have an issue with the excel being "lost" while the supposed WK4 file looks like excel. SaveCopyAs does not seem to help because that cannot be done against a single sheet and cannot convert to WK4. Any ideas about how I could do a SaveAs only in the background without renaming the excel?- Hide quoted text - - Show quoted text - This makes new problems. I do not want to close the original document, just export one of its sheets in the background. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On May 8, 1:26*pm, Joel wrote:
I don't think it will close the original. *Th ecopy will create a new workbook and become the activeworksheet. *The original should remain open. |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It didn't close it for me in Excel 2000 SP-3
|
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ed: Do you have any workbook events that may be changing the focus to a
different workbook? Try this instead 'create newwork book with copy of sheetx Sheets("sheet1").Copy set newbk = activeworkbook newbk.SaveAs Filename:="C:\temp\abc.wk4", FileFormat:=xlWK4, _ CreateBackup:=False newbk.Close "Edward" wrote: On May 8, 1:26 pm, Joel wrote: I don't think it will close the original. Th ecopy will create a new workbook and become the activeworksheet. The original should remain open. "Edward" wrote: On May 8, 11:53 am, Joel wrote: 'create newwork book with copy of sheetx Sheets("sheet1").Copy ActiveWorkbook.SaveAs Filename:="C:\temp\abc.wk4", FileFormat:=xlWK4, _ CreateBackup:=False ActiveWorkbook.Close "Edward" wrote: I have an excel workbook with multiple sheets. I want to save one of the sheets as a WK4 in the background. I amusing the following code: Sheets("sheetx").SaveAs Filename:= "C:\xxx.wk4", FileFormat:=xlWK4, CreateBackup:=False The problem is that although the excel appears to still be open with all of the tabs, it has been renamed at the top to the WK4 filename. If I close the excel and open the WK4 then it opens as WK4 with only the sheet that I saved. My problem is that users may have an issue with the excel being "lost" while the supposed WK4 file looks like excel. SaveCopyAs does not seem to help because that cannot be done against a single sheet and cannot convert to WK4. Any ideas about how I could do a SaveAs only in the background without renaming the excel?- Hide quoted text - - Show quoted text - This makes new problems. I do not want to close the original document, just export one of its sheets in the background.- Hide quoted text - - Show quoted text - Have you tried it? It closes it for me. I have Excel 2002 (10.6823.6817) SP3 and VB 6.3. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Background Processes in File Save versus File SaveAs | Excel Programming | |||
SAveAs worksheet | Excel Worksheet Functions | |||
worksheet saveas workbook | Excel Programming | |||
SaveAs Method changes Worksheet Name | Excel Programming | |||
worksheet saveas question | Excel Programming |