Stepping Through (F8) Code suddenly executes all code?
Since you mentioned that the F8 button works as expected at first, most of my thoughts are cleaned from the table.
I cannot explain this, but perhaps I can provide a temporary "workaround", which is the best I can do.
You can simulate F8 by clicking each line followed by applying CTRL+F8 (Run to cursor).
The cursor will act as a breakpoint and it is less bothersome than placing / removing breaks on each and every line.
It is a little bit more handwork, but it goes as fast (at least on a regular desktop).
Hope it can at least reduce some of your frustration when debugging!
I found this solution also referenced here. The solution is to make a change to the registry (taken from the source):
The registry change affects RPC Debugging, and you can read more about it on the Microsoft website: Debugging COM Clients and Servers Using RPC Debugging
1.Close Excel
2.Make a backup of the Registry file, then open the Registry -- there are instructions on the Microsoft website
3.Go to the applicable Registry Key:
- For 32-bit Office on 64-bit Window go to registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VBA
- For 32-bit Office on 32-bit Window go to registry key: KEY_LOCAL_MACHINE\SOFTWARE\ Microsoft\VBA
- For 64-bit Office on 64-bit Windows go to registry key: KEY_LOCAL_MACHINE\SOFTWARE\ Microsoft\VBA
4.Right-click in the window at the right, and click New
5.Click DWORD (In the screen shot below, the DWORD is for 32-bit Office running on a 64-bit computer)
6.Name the DWORD as DisableOrpcDebugging7
7.Right-click the DWORD, and click Modify
8.Change Value to 1, and click OK.
9.The completed DWORD will appear in the Registry
10.Close the Registry, and re-open Excel, where the F8 key should now work correctly, stepping through the code.