+ Reply to Thread
Results 1 to 3 of 3

Inhibit Sub when running another Sub

  1. #1
    Registered User
    Join Date
    06-10-2009
    Location
    Germany
    MS-Off Ver
    Excel 2003
    Posts
    46

    Inhibit Sub when running another Sub

    Hi,

    I have an excel spreadsheet, where I am running Sub A, which checks, if users change entries. If so, in column R, the name and in column S, the date is saved.
    Now, I programmed Sub B, that cuts and pastes designated rows into an archive file. I would like to inhibit Sub A, because each row that is cut, means that the subsequent row switches lines, and columns R and S are updated (while no actual change occurred). Does someone have a suggestion for me?

    thanks in advance!
    Last edited by RoyMakaay1985; 09-14-2009 at 05:10 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Inhibit Sub when running another Sub

    So are you saying Sub A is in fact an Event driven sub routine - ie Worksheet_Change event or some such ? If so you can disable events:

    Please Login or Register  to view this content.
    Note use of Error handler - when disabling events it's important to ensure that should the code fail for whatever reason that it is handled such that events are re-established.

  3. #3
    Registered User
    Join Date
    06-10-2009
    Location
    Germany
    MS-Off Ver
    Excel 2003
    Posts
    46

    Re: Inhibit Sub when running another Sub

    Yes, I should have been more exact, I am using Worksheet_Change.

    Thanks for the advice. It leads me to another question, but I will open a new thread for that.

+ 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