PC Review


Reply
Thread Tools Rate Thread

Close excel in vbe

 
 
pls123
Guest
Posts: n/a
 
      22nd Jun 2009

hello all !!
im using this..

ThisWorkbook.Save
ThisWorkbook.Close

....to save and close my page at a indicated time..
...but the page of excel remains open..
...and i want to close it too..
how can i do it ??
tx all
 
Reply With Quote
 
 
 
 
EricG
Guest
Posts: n/a
 
      22nd Jun 2009

Application.Quit

If you have unsaved workbooks, Excel will ask you if you want to save them.
To avoid this message, you can add the lines below, or you can save the
workbooks ahead of time and then quit.

Application.DisplayAlerts = False
Application.Quit

HTH,

Eric


"pls123" wrote:

> hello all !!
> im using this..
>
> ThisWorkbook.Save
> ThisWorkbook.Close
>
> ...to save and close my page at a indicated time..
> ..but the page of excel remains open..
> ..and i want to close it too..
> how can i do it ??
> tx all

 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      22nd Jun 2009

ThisWorkbook.Save
application.quit

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"pls123" <(E-Mail Removed)> wrote in message
news:25BAD495-8AE2-41F5-9A2E-(E-Mail Removed)...
> hello all !!
> im using this..
>
> ThisWorkbook.Save
> ThisWorkbook.Close
>
> ...to save and close my page at a indicated time..
> ..but the page of excel remains open..
> ..and i want to close it too..
> how can i do it ??
> tx all


 
Reply With Quote
 
pls123
Guest
Posts: n/a
 
      23rd Jun 2009

tx all !!

"Don Guillett" wrote:

> ThisWorkbook.Save
> application.quit
>
> --
> Don Guillett
> Microsoft MVP Excel
> SalesAid Software
> (E-Mail Removed)
> "pls123" <(E-Mail Removed)> wrote in message
> news:25BAD495-8AE2-41F5-9A2E-(E-Mail Removed)...
> > hello all !!
> > im using this..
> >
> > ThisWorkbook.Save
> > ThisWorkbook.Close
> >
> > ...to save and close my page at a indicated time..
> > ..but the page of excel remains open..
> > ..and i want to close it too..
> > how can i do it ??
> > tx all

>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error in running workbook.close() func. after close excel from win Kayıhan Microsoft C# .NET 0 29th Mar 2009 12:49 AM
Close a Excel Workbook when close a userform in Outlook lars.oyangen@hamstad.no Microsoft Outlook VBA Programming 2 8th May 2008 02:54 PM
Excel shoud not close all active books when clicking close button =?Utf-8?B?dGVjaG5vbWlrZQ==?= Microsoft Excel Misc 0 10th Jun 2005 05:35 PM
excel - Windows close button (x) should only close active workboo. =?Utf-8?B?Q29mZmVlQWRpY3Q=?= Microsoft Excel Setup 3 8th Feb 2005 04:30 AM
Excel 2000 Workbook close button hides instead of close Steven Robinson Microsoft Excel Misc 3 13th Aug 2003 11:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:30 PM.