Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

event marco vba

ResolvedVersion 2007

Alix has attended:
Excel VBA Intro Intermediate course

Event Marco, VBA

Background: There is an event marco to prompt a msgbox to ask users for a comment log every time before close if there is a change to the files in excel file I am working work with.
I have to use write a marco to implement a change to all these files.

Question: how to skip event marco or having a marco to answer the msgbox pop from event marco, in order to deal with the msgbox?

RE: Event Marco, VBA

The easiest way to do this is for all the event code that happens at the close of the file to be skipped. Before you close the file enter the line

Application.EnableEvents = False

and then after the close has happened its important to turn events back on.

Application.EnableEvents = True

Hope that helps.

Laura GB

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

New Normal Worksheet

Do you want all your worksheets to confirm to a certain look? Then change the Defaults!!!
1. Press Shift+F11 to create a new worksheet
2. Press Ctrl+A to select (higlight) all cells, Press Ctrl+1, make any formatting changes then click OK.
3. Press F12 (Function 12 key) click in the Save As Type, drop down, then select Template (*.xlt)
4. Click in the Save in drop-down, then find the folder; c:_program files_microsoft office_office_start. (For the underscores shown use backslash)
Name your templete sheet.xlt, then press Enter.
Sheet.xlt is used when you insert a new worksheet (Shift+F11)

Note: These changes are permanent changes on your PC.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.