+ Reply to Thread
Results 1 to 2 of 2

Workesheet Calculate - strange behaviour and theoretical question...

  1. #1
    Registered User
    Join Date
    03-11-2005
    Posts
    87

    Workesheet Calculate - strange behaviour and theoretical question...

    Hi all,

    I have the following strange thing happening in a Worksheet Calculate code:

    there are three pieces of code, each one indipendent and triggered by certain events on the sheet. they happen in the order that they are in the code (=the second cannot be without the first, the third without the second). i have used the following structure:

    Sub Worksheet Calculate
    If...
    End if

    If..
    End if

    If...
    End If

    End sub


    Now, if they are all together in the code only the first gets triggered but not the second and the third, even with the events triggering them. If each of them appears in the code as standlone (second but not 1st and 3rd etc) they all work!

    Am I missing something??

    Many thanks

    BC

  2. #2
    STEVE BELL
    Guest

    Re: Workesheet Calculate - strange behaviour and theoretical question...

    Sounds like you need 1, than 2, than 3
    You can put addiontional code between the if's.
    you can add ElseIf's, Else....

    If condition1 then

    if condition2 then

    if condition 3 then

    end if

    endif

    End If

    --
    steveB

    Remove "AYN" from email to respond
    "bondcrash" <[email protected]> wrote
    in message news:[email protected]...
    >
    > Hi all,
    >
    > I have the following strange thing happening in a Worksheet Calculate
    > code:
    >
    > there are three pieces of code, each one indipendent and triggered by
    > certain events on the sheet. they happen in the order that they are in
    > the code (=the second cannot be without the first, the third without
    > the second). i have used the following structure:
    >
    > SUB WORKSHEET CALCULATE
    > IF...
    > END IF
    >
    > IF..
    > END IF
    >
    > IF...
    > END IF
    >
    > END SUB
    >
    > Now, if they are all together in the code only the first gets triggered
    > but not the second and the third, even with the events triggering them.
    > If each of them appears in the code as standlone (second but not 1st
    > and 3rd etc) they all work!
    >
    > Am I missing something??
    >
    > Many thanks
    >
    > BC
    >
    >
    > --
    > bondcrash
    > ------------------------------------------------------------------------
    > bondcrash's Profile:
    > http://www.excelforum.com/member.php...o&userid=20997
    > View this thread: http://www.excelforum.com/showthread...hreadid=385657
    >




+ 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