+ Reply to Thread
Results 1 to 4 of 4

In macro forbid calling another macro

  1. #1
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,043

    In macro forbid calling another macro

    I have a macro in a sheet that runs on a cell change:

    Please Login or Register  to view this content.
    I saw that other macro call this function although it doesn't use this cell.

    If I know that some other macro won't use this cell can I force macro to skip running this one?

    If you need example workbook you can download from this post: http://www.excelforum.com/excel-prog...18#post2717018
    Last edited by zbor; 05-09-2012 at 09:45 AM.
    Never use Merged Cells in Excel

  2. #2
    Valued Forum Contributor MaczaQ's Avatar
    Join Date
    06-03-2011
    Location
    Poland
    MS-Off Ver
    Excel 2003 / XP
    Posts
    510

    Re: In macro forbid calling another macro

    did you try to work with
    Please Login or Register  to view this content.
    Best Regards
    MaczaQ
    ---------------------------------------------------------------------------------------------------------------------------
    If you are satisfied with the solution(s) provided, please mark your thread as Solved
    If you are pleased with my answer consider to rate it. To thank someone who has helped you, click on the star icon below their name.
    - This way you will add him some reputation points ... thanks in advance.

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: In macro forbid calling another macro

    Hi zbor
    In a General Module (matters not which) place this at the very top of the Module (the very first line) Public Flag as Boolean. Then, in your Change Event Code, add this line
    Please Login or Register  to view this content.
    In your Cmd_AddToList_Click code add these two lines
    Please Login or Register  to view this content.
    In your AddToList code add these two lines
    Please Login or Register  to view this content.
    I think I found them all.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,043

    Re: In macro forbid calling another macro

    Thank you both, this works.

+ 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