+ Reply to Thread
Results 1 to 5 of 5

Macro stopping another macro

  1. #1
    Registered User
    Join Date
    08-08-2012
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    5

    Macro stopping another macro

    Hello all,
    I am working on file, that has two major elements. First macro is copying data from another file and pasting it to the sheet. Second is Worksheet_Change for some cells. If seperately, both work perfectly.
    However, if I have Worksheet_Change active, running the first macro brings me a plenty of errors (because data are pasted to "controlled" cell).

    What I wish to get is following:
    Running first macro deactivates "Worksheet_Change" and activates it again after all procedures.

    Any idea how to do that?

    Thanks in advance.

  2. #2
    Forum Contributor bonny24tycoon's Avatar
    Join Date
    04-02-2012
    Location
    Hell
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    405

    Re: Macro stopping another macro

    As I cannot see your macro and the work it performs.

    However,

    At the beginning of it, insert the code line
    Please Login or Register  to view this content.
    and at the end of it, insert the code line
    Please Login or Register  to view this content.
    Thanks,

    Bonny Tycoon


  3. #3
    Registered User
    Join Date
    08-08-2012
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Macro stopping another macro

    Exactly, what I've been looking for, thanks a lot.

  4. #4
    Forum Contributor bonny24tycoon's Avatar
    Join Date
    04-02-2012
    Location
    Hell
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    405

    Re: Macro stopping another macro

    Thats great... If your issue has been resolved, can you mark your thread as solved

  5. #5
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Macro stopping another macro

    @ PoncjuszPilat

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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