Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default worksheet SaveAs WK4 in background

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default worksheet SaveAs WK4 in background


'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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default worksheet SaveAs WK4 in background

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default worksheet SaveAs WK4 in background

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default worksheet SaveAs WK4 in background

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 411
Default worksheet SaveAs WK4 in background

It didn't close it for me in Excel 2000 SP-3
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default worksheet SaveAs WK4 in background

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
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
Background Processes in File Save versus File SaveAs Paige Excel Programming 2 April 24th 08 11:57 PM
SAveAs worksheet Brian Young Excel Worksheet Functions 14 October 25th 06 12:21 PM
worksheet saveas workbook Nigel Excel Programming 2 August 11th 05 05:40 PM
SaveAs Method changes Worksheet Name nmagerl[_2_] Excel Programming 0 May 25th 05 04:08 PM
worksheet saveas question Jim Rech Excel Programming 1 March 30th 05 08:50 PM


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