Phantom breakpoint? (1 Viewer)

Gasman

Enthusiastic Amateur
Local time
Today, 19:06
Joined
Sep 21, 2011
Messages
14,231
Hi all,
I have a few lines of code that allow me to import an Excel sheet each day from one of our online systems.

I recently made an amendment to it, and set a breakpoint on a certain line.
Once all was working I removed the breakpoint using the Clear All Breakpoints option as I normally do.

However when running it still stops at that line despite there not being any breakpoint indicator.

I saved the code and workbook after clearing as I normally do, and even tried compiling as well, to no avail.?
The code is in my Personal Workbook.


Has anyone had this happen to them and if so, how do you correct it please.?
 
Last edited:

Minty

AWF VIP
Local time
Today, 19:06
Joined
Jul 26, 2013
Messages
10,366
Try setting the breakpoint on that same line again. Save code Then remove it again and resave.
Or delete the line then save the code.
Comapct and repair then re-instate the line.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 19:06
Joined
Feb 19, 2013
Messages
16,606
It has happened to me a long time ago, can't remember why but think it was to do with changing code whilst in break mode.

solution is to decompile/recompile and throw in a compact for good measure.

Alternatively you could try copy and pasting the offending function/sub to notebook. Delete from your module and save, then copy/paste back from notebook to the module
 

Gasman

Enthusiastic Amateur
Local time
Today, 19:06
Joined
Sep 21, 2011
Messages
14,231
Damn, that was quick guys.:D


This is in Excel. I was not aware of a Compact & Repair.?
I'll try the other options now.


Thank you.
 

isladogs

MVP / VIP
Local time
Today, 19:06
Joined
Jan 14, 2017
Messages
18,209
A slight variation on minty's suggestion is to add a space in your code, save it, remove it and save it again to force a recompile.
 

Gasman

Enthusiastic Amateur
Local time
Today, 19:06
Joined
Sep 21, 2011
Messages
14,231
Thanks all.
From your suggestions I commented out the code and saved, uncommented and saved again.

I put back my backup from todays run and tried again, as this code only runs on certain conditions, one of them happening today, hence my post.


Pleased to say, it did not stop this time. Hopefully that will fix it, but if not, I will try the other options and the code cleaner as well. Thanks for that link Colin.
 

Gasman

Enthusiastic Amateur
Local time
Today, 19:06
Joined
Sep 21, 2011
Messages
14,231
I've done that many a time.:D


I posted it here in this site as I thought as it was a VBA problem, it would happen in Access as well? Seems it does.



my bad, didn't notice the forum section and this threw me off
 

Gasman

Enthusiastic Amateur
Local time
Today, 19:06
Joined
Sep 21, 2011
Messages
14,231
Have had two more occurrences when the code would pass by that breakpoint. Each time it has passed without stopping.


Thank you all.
 

Users who are viewing this thread

Top Bottom