+ Reply to Thread
Results 1 to 5 of 5

Macro not running if VBA editor is not open

  1. #1
    Registered User
    Join Date
    10-03-2019
    Location
    Spain
    MS-Off Ver
    Offcie 365
    Posts
    3

    Macro not running if VBA editor is not open

    I have a simple macro that adds a BCC email recipient depending on user choice.
    It is invoked every time the SEND button is pressed.
    It is stored in ThisOutlookSession
    Conceptually it is

    Please Login or Register  to view this content.


    The problem:
    If I just open Outlook it does not wor when I click any SEND button.
    But if I open the VBA editor after opening Outlook, it works like a charm.

    Any suggestion?
    Last edited by alansidman; 10-03-2019 at 05:19 PM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: Macro not running if VBA editor is not open

    Code Tags Added
    Your post does not comply with Rule 2 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    10-03-2019
    Location
    Spain
    MS-Off Ver
    Offcie 365
    Posts
    3

    Re: Macro not running if VBA editor is not open

    Thank you Alan
    Lots to learn

  4. #4
    Registered User
    Join Date
    10-04-2019
    Location
    Buenos Aires, Argentina
    MS-Off Ver
    2016
    Posts
    1

    Re: Macro not running if VBA editor is not open

    I'm checking this problem with initiator and I can see that the event code that appears in initial post is not complete. This is the complete code used (which is un in ThisOutlookSession) :

    Please Login or Register  to view this content.
    I'm in another location and when I've used this code, it works ok but for some reason it is doing nothing when initiator test it. Any help on this matter is really appreciated.

  5. #5
    Registered User
    Join Date
    10-03-2019
    Location
    Spain
    MS-Off Ver
    Offcie 365
    Posts
    3

    Re: Macro not running if VBA editor is not open

    Strictly speaking this is not a macro but an event that is supposed to be triggered by the SEND button in Outlook. It is stored in ThisOultookSession

+ 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. Macro has errors if Visual Basic Editor is not open
    By Whizbang in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-22-2022, 03:09 PM
  2. Macro running slowly when executed from the VBA Editor
    By TheRobsterUK in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-12-2017, 09:18 AM
  3. code works running in visual basic editor but not when running from Excel macro
    By smporco in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-06-2016, 05:44 PM
  4. Macro not running on workbook open...
    By sourabhg98 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-03-2015, 01:23 AM
  5. Don't open the VB Editor when a macro is executed
    By rajusampathirao in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-21-2008, 06:55 AM
  6. Q: Open VB - Editor from macro...?
    By Andrew in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-25-2005, 03:05 PM
  7. [SOLVED] Auto Running a macro on open
    By Jamie in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-24-2005, 01:06 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