event programming
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Event programming

Event programming

resolvedResolved · Low Priority · Version 2003

replyReply Thu 12 Aug 2010, 16:39Delegate Robert said...

Robert has attended:
Excel VBA Intro Intermediate course

Event programming

How do you get code to run when excel shuts down?

Thanks,
Robert

For upcoming training course dates see: Pricing & availability

replyReply Fri 13 Aug 2010, 22:06Trainer Anthony said...

RE: Event programming

Hi Robert, thanks for your query. You add the Auto_Close subroutine to your module:

Sub auto_close()
MsgBox "Goodbye"
End Sub

Try saving the worksheet and then closing it down now. It should say goodbye.

Hope this helps,

Anthony

 

Please browse our web site to find out more about
excel consulting and other Microsoft training courses.

Excel tip:

Using Excel's MODE function

Use Excel's MODE function to display the most common value present in a particular range of cells.

The Mode function looks like this:

=MODE(cell range)

As an example, if 35 is the most commonly recurring number in a particular cell range, then the function will display 35.

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard