Results 1 to 5 of 5

Debug jumping to wrong lines ... This is not logical???

Threaded View

RustyNail Debug jumping to wrong lines... 04-17-2015, 04:50 PM
alansidman Re: Debug jumping to wrong... 04-17-2015, 04:55 PM
RustyNail Re: Debug jumping to wrong... 04-18-2015, 01:14 PM
romperstomper Re: Debug jumping to wrong... 04-18-2015, 06:18 PM
RustyNail Re: Debug jumping to wrong... 04-18-2015, 06:58 PM
  1. #1
    Forum Contributor
    Join Date
    03-07-2013
    Location
    Montreal
    MS-Off Ver
    Excel 2007
    Posts
    274

    Debug jumping to wrong lines ... This is not logical???

    Hello,

    I have been using VBA/Excel for a few days now and now I have come across a weird situation.

    Please view the following VBA code which is executed after updating a combo box made from data validation method:


    
    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim s As String
    Dim c As Long
    Dim r As Long
    Dim retRowVal As Integer
    
    
    c = ActiveCell.Column
    r = ActiveCell.Row
    
    
    If Target.Address = Cells(r, c).Address Then         'Comes from >>> If Target.Address = Range("G3").Address Then
        s = Target.Value
        Call Pin_IO_Assignmets(r, c, s)  ' <<<LINE A
    Else
        retRowVal = Find_Block_Stamp_From_Anywhere(r, c)  '<<< LINE B
    End If
    
    End Sub
    Above I put two break points one on LINE A and one on line B. My question is, how can this be that when I single step from LINE A the program jumps to LINE B ???

    This doesn't make sense as it should jump to the "End Sub" Line !!!!

    Frustrated and confused.... can someone please get back with some help as to why this bazar behavior is happening.

    Thanks again for any help
    Much appreciated
    Last edited by RustyNail; 04-17-2015 at 05:14 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Why are the wrong numbers/lines being printed?
    By sjde in forum Excel General
    Replies: 2
    Last Post: 03-05-2015, 01:31 AM
  2. Replies: 2
    Last Post: 03-17-2014, 06:01 PM
  3. VBA Code Runs in Debug Mode But Returns Type Mismatch Error Outside Debug Mode
    By valerie.k.chiang in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-24-2014, 03:48 PM
  4. [SOLVED] Debug: How to debug this code?
    By reach78 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-25-2013, 07:16 AM
  5. jumping connector lines
    By Wombat in forum Excel General
    Replies: 10
    Last Post: 04-06-2009, 05:06 AM

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