Breakpoint not working

JenniferMurphy

Well-known Member
Joined
Jul 23, 2011
Messages
2,687
Office Version
  1. 365
Platform
  1. Windows
I am testing a function in my add-in module. It is getting a value error in the calling cell. I set a breakpoint on the Function statement and a couple of other places in the VBA editor, but they never happen.

I wrote another simple function to test the breakpoint function:

VBA Code:
Function abc(pX)

abc = "Called with " & pX

End Function

Here's the breakpoint:

1720117663134.png


If I call it from a cell =abc(3), it returns "Called with 3", but the breakpoint never happens.

What the heck is going on now?
 
Ok. I exported all 20 of my add-in modules, then imported just MyUtil.

1720143160090.png


Breakpoint does not work. Neither does Stop or Debug.assert False.

1720143277721.png


Now what?
 
Upvote 0

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Not saying it is your issue but you could try the answer Mr Kusleika posted on SO a few years back (not sure if Codecleaner is still available as I couldn't use it as there was never a 64bit version)

As I said, I exported, removed, and imported all 20 add-in modules. Did not solve the problem. Frustrated from trying to debug some code using MsgBox, which did still work, I asked ChatGPT. I got 8 suggestions. #4 was to do the export/import, but the adding step of closing Excel between the export and import. Now everything seems to be working: breakpoints, Stop, and Debug.Assert.

I know solutions from chat bots are forbidden here, but I tested this one and can confirm that it works. I hope that is OK.

I also have the chat saved as a PDF. I will post it here if someone will tell me that it is Ok.
 
Upvote 0
it doesnt break because the function doesnt fire.
usu refresh will fire off the function.
 
Upvote 0
I know solutions from chat bots are forbidden here, but I tested this one and can confirm that it works
That's fine since it was your question, and you verified the accuracy of the response. It's really people just getting AI to create answers to other people's questions that the rule is aimed at.
 
Upvote 0
That's fine since it was your question, and you verified the accuracy of the response. It's really people just getting AI to create answers to other people's questions that the rule is aimed at.
Ok. I just learned that chats can be shared. Here's the link to it's answer to my question in this thread.


That chat was helpful. But it is not always helpful and can sometimes make shockingly obvious mistakes. I just had a very frustrating experience with ChatGPT. I asked it to generate a table showing which presidential candidate is leading in the polls in each state and how the electoral votes are likely to go. I got what looked like a great table, so I pasted it into an Excel sheet. The totals Excel calculated did not agree with the ones ChatGPT provided and it did not include Wash DC, which has 3 electoral votes. We went back and forth for over an hour. I finally got what I believe is correct data, but only after pointing out a lot of errors, including some obvious ones. The resulting chat is 25 pages long. And this is with their new, improved version ChatGPT-4o.

Here are a few of the most obvious errors.

54 + 10 + 7 + 3 + 4 + 19 + 4 + 10 + 11 + 10 + 4 + 14 + 5 + 28 + 8 + 4 + 3 + 13 + 12 = 219
The correct sum is 223.

9 + 3 + 6 + 30 + 16 + 4 + 11 + 6 + 6 + 8 + 8 + 6 + 10 + 4 + 5 + 3 + 17 + 7 + 9 + 3 + 11 + 40 + 6 + 4 + 3 = 246
The correct sum in 235

Biden: 219 + (77/2) = 219 + 38.5 = 257.5 (rounded to 258)

Trump: 246 + (77/2) = 246 + 38.5 = 284.5 (rounded to 280)
Why was 284.5 rounded to 280?

54 + 10 + 7 + 3 + 4 + 19 + 4 + 10 + 11 + 10 + 4 + 14 + 5 + 28 + 8 + 4 + 3 + 13 + 12 + 11 + 15 + 6 + 9.5 + 5 = 258.5
The correct sum is 269.5

9 + 3 + 6 + 30 + 16 + 4 + 11 + 6 + 6 + 8 + 8 + 6 + 10 + 4 + 5 + 3 + 17 + 7 + 9 + 3 + 11 + 40 + 6 + 4 + 16 + 9.5 + 5 = 278.5
The correct sum is 262.5

There were many more. If anyone cares to take a closer look, here's the link to that chat.


AI bots can be helpful, but they make a lot of errors. The AI rule here is clearly appropriate..
 
Upvote 0
D*mn. It just happened again, but this time with a workbook module.

? Do I have to reinstall just that one module or all of the add-in modules as well?

? It looks like CodeCleaner is no longer available. Is there anything else?
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top