Close excel in vbe

P

pls123

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
 
E

EricG

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top