Debugging Visual Basic for Applications - Office 2010

Am I missing something ?
I'm writing some very simple VBA in Office 2010 - tinkering with powerpoint at the moment

When I run the code and its correct then its all fine - what I find really irritating and takes up a lot of my time is debugging.

When I've wriitten code in the past and there was an error then the program would stop - a message box would appear explaining the error, the code would 'break' and the code window would appear with the offending line highlighted in yellow. I liked this !

Now when an error occurs in Office (Powerpoint - but it think its the same with all apps), there is no message box, the code does not 'break' and no code window or highlight appears. The only indication that there is a problem is that the expected actions do not happen, it seems that errors are silent - this makes tracking down the source of problems very tricky indeed,

Can Office 2010 VBA be made do show errors the way previous versions used to ?

I've gone to Tools->Options->General on the VBA screen and set 'Break on all Errors' - but without any affect.

Yesterday I has a problem with a badly formed filename - a run-time error  - it took me 3hrs to find out what the problem was, once I'd located the issue it only took a couple of seconds to fix it - I need to work more productively and be able to locate errors more efficiently.
LVL 70
Brian PiercePhotographerAsked:
Who is Participating?
 
Brian PiercePhotographerAuthor Commented:
anyone ?
0
 
Richard DanekeTrainerCommented:
When you test your VBA with a run from the VBA editor, I think you will see this.
You can step thru the code, use the Immediates window, a watch window, etc. to test before running in  PowerPoint.
0
 
Brian PiercePhotographerAuthor Commented:
Tried that - but can't do some things as some of the code relies on a sheet/slide/document being open on-screen.

Am I the only person ith these issues ?? how do others effeicently debug VBA ?
0
 
Brian PiercePhotographerAuthor Commented:
No solution
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.