Breakpoint Doesn't Break. Stop Doesn't Stop.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a macro set to run on mouseclick in Powerpoint 2003. I need to debug
it so I set a breakpoint on the first line. But ... the macro doens't stop!

Curiously, the first statement is debug.print "rowCrawl". It prints, but
doesn't stop.

I've added a stop statement, but it motors right past it with nary a glance.

debug.assert false DOES stop things, but when I hit F8 (step into) it just
motors away again without another pause. Adding debug.assert false all over
the place is tedious at best.

There seems to be a similar problem with Access, but I can't find anything
in Powerpoint or Powerpoint VBA that matches the special keys described for
the Access fix.

Suggestions anyone?

Thanks,
Ed
 
Cool. Sounds like a neat type of error (worthy of hair pulling). What
add-ins (both PPA and COM) do you have loaded?


--
Bill Dilworth
A proud member of the Microsoft PPT MVP Team
Users helping fellow users.
http://billdilworth.mvps.org
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
vestprog2@ Please read the PowerPoint FAQ pages.
yahoo. They answer most of our questions.
com www.pptfaq.com
..
 
Argh. I hate it when I have interesting problems.

No add-ins (or articial flavors).

References:

Visual basic for applications
MS PowerPoint 11.0 Object Library
OLE Automation
MS Office 11.0 Object Library
MS Forms 2.0 Object library
MS Excel 11.0 Object Library

Thanks,
Ed
 
Have you tried the code on another machine? IOW is it machine based or code
based?

If it is machine based, are you current on all updates, have you tried a
detect and repair on Office?

If it is code based, have you tried deactivating all your On Error traps?


Bill Dilworth
 
I don't have another PPT 2003 handy to test, so I'll have to delay that.
Stay tuned.

I have all the latest updates installed.

When I reset the error traps on the first line of the mouseclick macro, it
still does not stop at the second line for breakpoints or stops (or even
stops with breakpoints set!):

On Error GoTo 0
Stop '

debug.assert false on that second line stops it dead. I have no event
handlers in the code - "withevents" never appears.

Ah, one more clue. If I set a breakpoint in a supporting subroutine or
function and call that routine from the immediate window, it stops. The same
routine called by way of a mouse click doesn't.

Puzzled as ever,
Ed
 
Finally getting back to the question of whether this problem occurs on
a different PC.

Yes, it does.

I passed the code along to a colleague for a similar project. He can't
get it to stop at breakpoints either.

For the moment, both of our projects are complete (and successful) -
but I know this will return to bite me in the bum again next time.

Suggestions welcomed.

Regards,
Ed
 
Finally getting back to the question of whether this problem occurs on
a different PC.

Yes, it does.

I passed the code along to a colleague for a similar project. He can't
get it to stop at breakpoints either.

For the moment, both of our projects are complete (and successful) -
but I know this will return to bite me in the bum again next time.

Suggestions welcomed.

One, in case you haven't done it already:

In the VBA IDE, put your cursor in the procedure that's giving you trouble and
choose Debug, Compile. Any errors reported?

PowerPoint won't complain about compile errors in macros while the slideshow's
running. It simply ignores you. You have to manually force a compile to be
certain that your code will run at all.
 
Nope. Compiles fine. I learned the compile trick through painful
experience. :(

This one runs well. It's getting it to stop that has me stumped.

Ed
 
Nope. Compiles fine. I learned the compile trick through painful
experience. :(

This one runs well. It's getting it to stop that has me stumped.

Hm. Can you post the code here?
 
Ed, I know this may sound silly but have you done a cold re-boot? (Power
Off /On) I ran into something like this some time back and it drove me nuts
until I did a cold boot of the system.



Austin Myers
MS PowerPoint MVP Team

Provider of PFCMedia, PFCPro, PFCExpress
http://www.pfcmedia.com
 
Which, all in all makes me think that I've managed to snarl up some
persistent option in Powerpoint or VBA, but finding out which one and
restting it has me stumped.

Not sure either, but fwiw it works here, whether I select something and run
from the IDE or apply the macro to a shape and click it during slide show.

One other possibility ... if this macro lives in a larger project, try starting
a new PPT file and put just your test code into it. If that works where it
doesn't in the original file, your project may be going corrupt. It happens
sometimes.

If so, save a backup right away. Two's better. Then you'll want to do a
"code-cleaning" on one of them. Yell if you need to know how to do that.
 
Thank you Steve (et al). I appreciate the pulling of hair and gnashing of
teeth that is going into this one.

The simple sample above was typed fresh into a new presentation, so it's ppt
that's snarled, not a particular project. But, I did have a couple of
thoughts as I did a major rebuild of my laotp this weekend. More after I
have a chance to chase them down. (Not to be mysterious - I'm just running
tight on time as the calendar ticks towards Christmas and don't want to toss
half baked nonsense into the forum.)

Take care,
Ed
 
Thank you Steve (et al). I appreciate the pulling of hair and gnashing of
teeth that is going into this one.

The simple sample above was typed fresh into a new presentation, so it's ppt
that's snarled, not a particular project. But, I did have a couple of
thoughts as I did a major rebuild of my laotp this weekend. More after I
have a chance to chase them down. (Not to be mysterious - I'm just running
tight on time as the calendar ticks towards Christmas and don't want to toss
half baked nonsense into the forum.)

You said "half baked" ... do you realize that this will probably set off a food
thread that'll still be running when you get back after the holidays? <g>

C'mon back when there's time, Ed.
 
Someone mention food? Hmmm ... half-baked chocolate-chip cookie and
mint-flavored ice-cream sandwiches

Is there any chance of getting a copy of this project emailed to me so I can
play with it? Worst case ... I have a beta computer that I can rebuild if
it causes damage. Best case ... I find out where the code is fubar.

I know this will sound stupid, but how are you calling the rowCrawl routine?
You have an action setting on a shape set to run that macro, correct? If
you are referencing the macro without sending it from a shape it will have a
little conniption, but should throw an error. What type of object? Have
you round tripped the presentation itself thru HTML? It could be the shape
that is becoming corrupt, not the code.


--
Bill Dilworth
A proud member of the Microsoft PPT MVP Team
Users helping fellow users.
http://billdilworth.mvps.org
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
vestprog2@ Please read the PowerPoint FAQ pages.
yahoo. They answer most of our questions.
com www.pptfaq.com
..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top