Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / January 2006

Tip: Looking for answers? Try searching our database.

Writing a macro that will exit a spreadsheet

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dave Doc - 25 Jan 2006 14:02 GMT
Hi there.

I am designing a spreadsheet and have various macros running, print, save
etc, allocated to buttons on the sheet. However I would like to have a macro
that also exits the spreadsheet when I run it, unfortunately when I try and
record the macro I exit ok but the macro doesn't record. Any tips please?
ufo_pilot - 25 Jan 2006 15:09 GMT
I'm no expert, still learning the macro stuff myself,.
This has worked for me though... also upon a button_click Command.
this one saves first, then exits.

Sub SaveClose()
   ActiveWorkbook.Save
   ActiveWorkbook.Close
End Sub

> Hi there.
>
> I am designing a spreadsheet and have various macros running, print, save
> etc, allocated to buttons on the sheet. However I would like to have a macro
> that also exits the spreadsheet when I run it, unfortunately when I try and
> record the macro I exit ok but the macro doesn't record. Any tips please?
Dave Doc - 26 Jan 2006 13:41 GMT
Absolutely fantastic ufo_pilot!!!

You're a star, thank you very much

Dave Doc

> I'm no expert, still learning the macro stuff myself,.
> This has worked for me though... also upon a button_click Command.
[quoted text clipped - 11 lines]
> > that also exits the spreadsheet when I run it, unfortunately when I try and
> > record the macro I exit ok but the macro doesn't record. Any tips please?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.