+ Reply to Thread
Results 1 to 3 of 3

Sub jumps to a function in a separate module without reason (to me)

  1. #1
    Registered User
    Join Date
    06-11-2014
    Posts
    5

    Sub jumps to a function in a separate module without reason (to me)

    Hello, I have isolated a problem that I have for the last 6 hours. This sub will jump to a personal function without no reason (to me). It occurs once, every time that I change something in the sub, as a test, the change was only to "comment" or "uncomment" the "if" statement block or the next line instruction, in both cases this would repeat the same behaviour but only once and at the next execution, it does not jump. I can see this problem only when in "step into" mode.

    This is as much info for which I could find a pattern. I join the sub and the function to which the sub randomly jumps to. The jump occurs from different line in the sub, not always from the same line. The function code is in a separate module from the sub

    Thank you for your help
    Pierre

    THIS IS THE SUB CODE. I have trimmed it down to reproduce the problem with just a few lines.

    Please Login or Register  to view this content.

    NEXT IS THE FUNCTION CODE. That code works fine but I use it for something else, it has nothing to do with the above sub, it is in a separate module.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Sub jumps to a function in a separate module without reason (to me)

    That's a bug in Excel - you need to set your calculation mode to manual to avoid that glitch
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  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: Sub jumps to a function in a separate module without reason (to me)

    Perhaps

    Please Login or Register  to view this content.
    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.

+ 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. Replies: 2
    Last Post: 10-22-2014, 03:10 PM
  2. Replies: 13
    Last Post: 04-08-2014, 05:46 AM
  3. How to run a separate private procedure within the same module
    By clemsoncooz in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-16-2012, 05:07 PM
  4. Stepping through jumps to a User Defined Function
    By TryToExcel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-07-2010, 02:43 PM
  5. Reason for using Properies in Class Module?
    By danny2000 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-22-2010, 10:32 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