Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-17-2015, 07:55 AM
Officer_Bierschnitt Officer_Bierschnitt is offline Taming the VBA_debugger Windows 7 64bit Taming the VBA_debugger Office 2013
Advanced Beginner
Taming the VBA_debugger
 
Join Date: Oct 2015
Posts: 79
Officer_Bierschnitt is on a distinguished road
Default Taming the VBA_debugger

Hi,



I often use the "debugger" in the VBE to debug my scripts - that is, I use breakpoints or I step through the script line by line by pressing F8 repeatedly.
What happens quite often is that either
- after a while, the system just decides that going line by line is too slow and
just executes the remainder of the script at normal speed
OR
- the moment I execute a line of code opening a workbook that contains
macros itself, the VBE_code_window shows that macro instead of the one
I'm just working on and the execution_line_highlight is gone.

Can anybody confirm to me why this tends to happen and what I can do to avoid it?

Thanks a lot!

Best regards,

Officer_Bierschnitt

P.S.: Can that have something to do with the fact that there is VBA_code in one of the sheets here rather than in a general module?
P.P.S.: Maybe, but that is apparently not all - now I have moved the code to a general module, but the same thing still happens ...

Last edited by Officer_Bierschnitt; 11-18-2015 at 03:42 AM. Reason: additional info
Reply With Quote
  #2  
Old 11-20-2015, 03:32 AM
Officer_Bierschnitt Officer_Bierschnitt is offline Taming the VBA_debugger Windows 7 64bit Taming the VBA_debugger Office 2013
Advanced Beginner
Taming the VBA_debugger
 
Join Date: Oct 2015
Posts: 79
Officer_Bierschnitt is on a distinguished road
Default

This is really driving me mad.

I have been working for about 3 hrs now and everything was fine. I tested one piece of code, it worked and I inserted it into its correct place in the overall construct. Then I tried to step through it line by line - but that didn't work. Always after opening another worksheet, the VBE suddenly stops the debugging_mode and executes the remainder of the script in fast mode.
That is annoying because when something is not right, it is near impossible to see where exactly something goes wrong, it's too fast.
Reply With Quote
  #3  
Old 11-20-2015, 06:46 AM
Debaser's Avatar
Debaser Debaser is offline Taming the VBA_debugger Windows 7 64bit Taming the VBA_debugger Office 2010 32bit
Competent Performer
 
Join Date: Oct 2015
Location: UK
Posts: 221
Debaser will become famous soon enough
Default

Try this fix: http://blog.contextures.com/archives...-step-into-f8/
Reply With Quote
  #4  
Old 11-23-2015, 12:49 AM
Officer_Bierschnitt Officer_Bierschnitt is offline Taming the VBA_debugger Windows 7 64bit Taming the VBA_debugger Office 2013
Advanced Beginner
Taming the VBA_debugger
 
Join Date: Oct 2015
Posts: 79
Officer_Bierschnitt is on a distinguished road
Default

Hi Debaser,

that sounds good - only, I'm not sure about that.
I tried a different fix of sorts - I restarted the machine. That did the trick last time. I'll give this a think, but since our laptops are all centrally administered and IT doesn't like it at all when users do anything on their machines themselves which usually isn't possible ...
Thanks anyway!

Best regards,

Officer_Bierschnitt
Reply With Quote
  #5  
Old 12-01-2015, 05:11 PM
Graham Griggs Graham Griggs is offline Taming the VBA_debugger Windows 8 Taming the VBA_debugger Office 2013
Novice
 
Join Date: Dec 2015
Posts: 11
Graham Griggs is on a distinguished road
Default 2 problems

You have two problems

1 suddenly going into run mode

2 running startup script in newly opened workbook

The second is not a problem, that is how it is supposed to work
If that is not what you want then your logic is wrong, it could be that you are stepping through for the exact purpose of testing that logic
If you dont want it then delete / disable the startup code in the second sheet

Problem one I have not encountered before and I will follow the thread to see if there is an explanantion. you can work round it by setting a pause point, just click in the left hand column a few lines ahead and it will highlight the line in brown and then always stop there (also useful for skipping over loops that you know are working)
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Taming the beast: columns mrmagoo Word 6 08-23-2012 03:06 PM
Taming MS Word clemkonan Word 0 02-26-2010 03:11 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:42 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft