+ Reply to Thread
Results 1 to 3 of 3

BeforeClose event not firing?

  1. #1
    Registered User
    Join Date
    02-05-2007
    Location
    Lichfield, Staffs
    Posts
    8

    Smile BeforeClose event not firing?

    Hello All

    I'm a very basic Excel programmer, so be gentle! Can't find anything to guide me with a search so...

    I have a bit of code that adds an 'insert date' option to my right click menu - calls a popup calendar form.

    The code is in ThisWorkbook of Personal.xls

    I then have another bit of code to remove the right click menu option when the workbook closes - to stop me getting the menu option repeated everytime I open a new workbook, resulting in dozens of 'insert date' menu items.

    The problem is, my 'remove menu item' bit doesn't seem to work. If I enter the code to remove it in the 'run immediatly' box in VB, it works and removes the offending item. It just doesn't seem to run when I close my workbook - almost as if the BeforeClose event isn't firing.

    Any ideas? I'm sure it's probably something pretty basic!

    Please Login or Register  to view this content.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Bernmc,

    The group seperator is also an item on the menu. You added it but forgot to remove it as well. Here is the amended routine...

    Please Login or Register  to view this content.
    Sincerely,
    Leith ross

  3. #3
    Registered User
    Join Date
    02-05-2007
    Location
    Lichfield, Staffs
    Posts
    8
    Thanks Leith! You're a *!

    (That's a 'star', not a 'splat' )

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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