+ Reply to Thread
Results 1 to 7 of 7

Excel Events not Working

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    12-20-2012
    Location
    Qatar
    MS-Off Ver
    Excel 2010
    Posts
    171

    Excel Events not Working

    hi all

    i need ur help plz, almost all events are not working, i have excel 2010.

    i tried to CTRL+G and typed "Application.EnableEvents = True" and nothing happened

    example; the following simple code is not working;

    Sub Workbook_AfterSave(ByVal Success As Boolean)
    If Success Then
        MsgBox ("The workbook was successfully saved.")
    End If
    End Sub
    please help
    thanks.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Excel Events not Working

    Where you are having the event code? In which code window? It should be in ThisWorkbook Code window…


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Excel Events not Working

    Your code works weel on my excel 2010, where did you put the code ?
    If solved remember to mark Thread as solved

  4. #4
    Forum Contributor
    Join Date
    12-20-2012
    Location
    Qatar
    MS-Off Ver
    Excel 2010
    Posts
    171

    Re: Excel Events not Working

    yes it is saved with the file it self and the ext. is ".xlsm"

    when i clicked save, it is just saved without the message, did i miss anything?

    thanks.

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Excel Events not Working

    Did you add the code to the Thisworkbook object in the VBA project?

    If you put the code in a standard code module it will not work.
    Cheers
    Andy
    www.andypope.info

  6. #6
    Forum Contributor
    Join Date
    12-20-2012
    Location
    Qatar
    MS-Off Ver
    Excel 2010
    Posts
    171

    Re: Excel Events not Working

    solved, was saving it as a Module

    just for my information; all events should be in "Thisworkbook object"?, i am using a lot of macros and this is the first time i use "Thisworkbook object"

    thanks a lot.

  7. #7
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Excel Events not Working

    Not all events, only those exposed by the Thisworkbook object should be in there.

    Individual sheets have there own set of events. as do userforms.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Embedded charts with events not working?
    By Lindahl in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 04-18-2012, 12:56 PM
  2. Excel 2007 workbook_open events are not working
    By ljoseph in forum Excel General
    Replies: 1
    Last Post: 05-11-2010, 01:51 PM
  3. Worksheet Events Not Working Consistenly
    By incjourn in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-07-2009, 07:34 AM
  4. Passing Working Storage between Excel Events
    By BryanM67 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-02-2006, 02:26 PM
  5. Worksheet Events Not Working
    By Dyl in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-18-2005, 12:20 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1