+ Reply to Thread
Results 1 to 5 of 5

Detecting application launch to prevent both Open and New events firing

  1. #1
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    1,971

    Detecting application launch to prevent both Open and New events firing

    Hi,

    I've got and addin with some application level events, namely WorkbookOpen and NewWorkBook.
    I need both of these for when a user might add a new workbook or open one.

    However, when Excel is launched, both of these events are fired even though the initial blank workbook is unsaved.
    Is there anyway to not fire both of these during launch?

    Many thanks.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    Re: Detecting application launch to prevent both Open and New events firing

    Perhaps post your code...

  3. #3
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    1,971

    Re: Detecting application launch to prevent both Open and New events firing

    As attached except that it's saved as an addin. Issue only presents itself as an addin.
    So, when installed, if you launch excel you get both opened and new events (msgbox).
    Attached Files Attached Files
    Last edited by ByteMarks; 04-03-2020 at 12:20 PM.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Detecting application launch to prevent both Open and New events firing

    When do you want the events to be fired?
    If posting code please use code tags, see here.

  5. #5
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    1,971

    Re: Detecting application launch to prevent both Open and New events firing

    I resolved this. It was firing for the Addin events.

+ 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. How to unload all loaded userforms without firing their events
    By ImranBhatti in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-06-2019, 04:20 AM
  2. OnComm events not firing when more than two ports are open.
    By land35 in forum Excel - New Users/Basics
    Replies: 0
    Last Post: 06-12-2015, 03:17 PM
  3. Q: OLEObject in custom class, events not firing
    By miguel3d in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-03-2015, 08:45 PM
  4. Change events not firing
    By waratdenison in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-14-2014, 11:48 AM
  5. [SOLVED] Firing Click Events with Accelerators
    By Geoff in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 07-18-2005, 08:05 AM
  6. [SOLVED] Deactivate Events not Firing
    By William in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-05-2005, 01:05 AM
  7. [SOLVED] Excel App. level events not firing
    By Chris W. in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-28-2005, 12:06 AM

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