Excel Macros -- how do I exit Excel from a macro?

N

NJBrit

I need to edit a spreadsheet created each day at 5.45 am. I have
scheduled task running at 5.55am, that opens another workbookwhich ha
a macro that runs on open. This macro reformats and saves the workboo
I need, and then closes it and exits. Now I'm left with Excel in memor
with no open sheets. No problem if I'm in work that day, but if I'
out for a week, a new instance of Excel is added each day!
Is there a VBA/macro command that can shut down Excel completely?

THANK

And
 
N

NJBrit

Hi-- appreciate the quick response, this didn't work -- at first.
Then I realized that statement had to come *before* the
ActiveWorkbook.Close !!

THANKS again.
And
 
D

Dave Peterson

I wonder what would happen if you tossed the "activeworkbook.close" line
completely?
 
Top