Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Using Office 2003 and Windows XP.
I have an Excel file that is designed to open, run some code and then close itself and the current instance of the application that was started when the file was opened. Could someone please save my life and post some generic example VBA illustrating how to do this or, better yet, modify my existing code below? (If possible, I need this rather soon...) My current code closes the file, but not the Application: Dim oThisWorkBook As Workbook <Other code oThisWorkBook.Close SaveChanges:=False Thanks much in advance for your much needed assistance. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
'quit without any question
application.displayalerts=false application.quit "XP" wrote: Using Office 2003 and Windows XP. I have an Excel file that is designed to open, run some code and then close itself and the current instance of the application that was started when the file was opened. Could someone please save my life and post some generic example VBA illustrating how to do this or, better yet, modify my existing code below? (If possible, I need this rather soon...) My current code closes the file, but not the Application: Dim oThisWorkBook As Workbook <Other code oThisWorkBook.Close SaveChanges:=False Thanks much in advance for your much needed assistance. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, but this doesn't work. The file closes and leaves the Application up.
"Vergel Adriano" wrote: 'quit without any question application.displayalerts=false application.quit "XP" wrote: Using Office 2003 and Windows XP. I have an Excel file that is designed to open, run some code and then close itself and the current instance of the application that was started when the file was opened. Could someone please save my life and post some generic example VBA illustrating how to do this or, better yet, modify my existing code below? (If possible, I need this rather soon...) My current code closes the file, but not the Application: Dim oThisWorkBook As Workbook <Other code oThisWorkBook.Close SaveChanges:=False Thanks much in advance for your much needed assistance. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Instead of closing the workbook:
ThisWorkbook.Saved = True Application.Quit The workbook will close when the application quits. "XP" wrote: Thanks, but this doesn't work. The file closes and leaves the Application up. "Vergel Adriano" wrote: 'quit without any question application.displayalerts=false application.quit "XP" wrote: Using Office 2003 and Windows XP. I have an Excel file that is designed to open, run some code and then close itself and the current instance of the application that was started when the file was opened. Could someone please save my life and post some generic example VBA illustrating how to do this or, better yet, modify my existing code below? (If possible, I need this rather soon...) My current code closes the file, but not the Application: Dim oThisWorkBook As Workbook <Other code oThisWorkBook.Close SaveChanges:=False Thanks much in advance for your much needed assistance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Close Explorer Instance | Excel Programming | |||
Close Current File Then Open New file | Excel Programming | |||
Retrieving Current Excel Instance from Automation Add-IN | Excel Programming | |||
Is it possible to prevent opening of workbooks in the current instance of Excel? | Excel Programming | |||
Close second instance of excel | Excel Programming |