+ Reply to Thread
Results 1 to 5 of 5

Private Worksheet change function conflicts with another Code...Help

  1. #1
    Forum Contributor
    Join Date
    03-14-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    491

    Private Worksheet change function conflicts with another Code...Help

    Hi,

    I have a code embedded in a sheet so that when the sheet is selected a msg box pops up.

    I also have another code that selects this sheet, which causes the message box to appear and disrupts the workflow of the other macro...



    Here is the code that is in the sheet...

    Please Login or Register  to view this content.
    Can I alter this to be activated somehow after I run the first code...


    I'm thinking call it from the other macro but the sheet change event is critical...

  2. #2
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: Private Worksheet change function conflicts with another Code...Help

    In the code that activates that particular sheet, you can put this command to disable the worksheet activate event from being triggered.

    Please Login or Register  to view this content.
    Then you can set it back to True after you've done activating it.
    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Private Worksheet change function conflicts with another Code...Help

    At the beginning of your Sheet Activate code set your EnableEvents to false. Then at the end Set it back to true.

  4. #4
    Forum Contributor
    Join Date
    03-14-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    491

    Re: Private Worksheet change function conflicts with another Code...Help

    Quote Originally Posted by JOHN H. DAVIS View Post
    At the beginning of your Sheet Activate code set your EnableEvents to false. Then at the end Set it back to true.
    Your referring to the sheet that has the code (Triggered event) or the Macro that selects the sheet ...?

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Private Worksheet change function conflicts with another Code...Help

    I was referring too the code in Post#1. Can you share the code which activates the Sheet in Post#1? Is it necessary? Or can you use instead:

    Please Login or Register  to view this content.

+ 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 change this code into private sub
    By tantcu in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-16-2014, 01:56 PM
  2. 2 private subs in one worksheet without conflicts ????
    By wanty in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-05-2013, 11:38 PM
  3. Private Sub Worksheet Change Help please!
    By darrenkaye in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-29-2013, 12:55 PM
  4. [SOLVED] Private sub worksheet change, run when two seperate cells change
    By jtd84 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-11-2012, 06:47 PM
  5. Private Sub Worksheet Change Help
    By jacksaudio in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-07-2011, 06:18 AM
  6. [SOLVED] Private Function Code Change
    By Phil H in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-14-2006, 09:10 AM
  7. [SOLVED] Code Conflicts With Worksheet Change Code
    By Paige in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-03-2006, 12:30 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