Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default Is there a function for closing Excel using VB?

I have created a macro that saves the current worksheet to a specified
location with a specified name and then closes the worksheet. I would like
to be able to close the Excel application itself from the macro.

Can anyone tell me how?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 249
Default Is there a function for closing Excel using VB?

Application.Quit

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Norm" wrote:
|I have created a macro that saves the current worksheet to a specified
| location with a specified name and then closes the worksheet. I would
like
| to be able to close the Excel application itself from the macro.
|
| Can anyone tell me how?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default Is there a function for closing Excel using VB?

Thanks Dave.

Funny thing is that Application.Quit does not work if it is preceeded by
ActiveWorkbook.Close



"Dave Patrick" wrote:

Application.Quit

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Norm" wrote:
|I have created a macro that saves the current worksheet to a specified
| location with a specified name and then closes the worksheet. I would
like
| to be able to close the Excel application itself from the macro.
|
| Can anyone tell me how?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 249
Default Is there a function for closing Excel using VB?

Once the workbook is closed the code that is/was running terminates. You
shouldn't need that line.

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Norm" wrote:
| Thanks Dave.
|
| Funny thing is that Application.Quit does not work if it is preceeded by
| ActiveWorkbook.Close


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
Closing workbooks w/o closing Excel Barb in MD Excel Discussion (Misc queries) 3 February 15th 10 06:42 PM
Using "Find" function in Excel 2000, edit data without closing Fin rkgpihw Excel Discussion (Misc queries) 1 August 21st 06 07:39 PM
close workbook without closing excel and stop recursive function chris Excel Discussion (Misc queries) 3 July 10th 06 08:23 PM
Closing VB triggers closing Excel Minilek Excel Programming 2 August 6th 04 05:17 PM
closing excel after closing a workbook CWalsh[_2_] Excel Programming 3 January 21st 04 03:33 PM


All times are GMT +1. The time now is 05:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"