#1
|
|||
|
|||
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 |
#2
|
|||
|
|||
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. |
#3
|
||||
|
||||
Try this fix: http://blog.contextures.com/archives...-step-into-f8/
|
#4
|
|||
|
|||
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 |
#5
|
|||
|
|||
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) |
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 |