Closing an excel object without closing all open excel files 
Author Message
 Closing an excel object without closing all open excel files

Currently I am running VB script in excel.  I open an excel file, save it's
sheets as .csv then close the file.

The problem is that if an excel file is already open when this script is
run, then when the script finishes, all excel files are closed.

I want to (if other excel files are open) create an excel object, then
successfully close it and only it, not all the other excel files that were
open before the script was run.

Thanks in advance
    Sasa Radakovic



Sun, 11 Jan 2004 01:14:42 GMT  
 Closing an excel object without closing all open excel files
Hi Sasa,

I think all excel files are closed when you close the
excel application.

Can you post your code on how you are closing the workbook?

Use wrkbook.Close command to close the workbook, where
wrkbook is an instance variable to the workbook you are
working on.

HTH

-Srini

Quote:
>-----Original Message-----
>Currently I am running VB script in excel.  I open an

excel file, save it's
Quote:
>sheets as .csv then close the file.

>The problem is that if an excel file is already open when
this script is
>run, then when the script finishes, all excel files are
closed.

>I want to (if other excel files are open) create an excel
object, then
>successfully close it and only it, not all the other

excel files that were
Quote:
>open before the script was run.

>Thanks in advance
>    Sasa Radakovic

>.



Sun, 11 Jan 2004 01:34:06 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. open excel file and close without saving

2. Excel 2000 closes when opening a spreadsheet that opens OK in Excel 97

3. Instance of Excel still running after Excel object closed

4. Excel 2002 file with VBA crashes while closing without saving changes

5. How do I close an instance of Excel programatically using Excel.application object

6. dangling class object causes excel to crash upon file close

7. no data displayed when opening excel attachement from outlook and closing excel reboots the computer

8. no data displayed when opening excel attachement from outlook and closing excel reboots the computer

9. Outlook VBA - open Excel, read in two fields, send email with these, close excel

10. Long time to OPEN, CLOSE, and SAVE an Excel file


 
Powered by phpBB® Forum Software © phpBB Group