Is there a way to convince the VBA editor in Excel to stop auto-formatting lines to remove the space at the end when I pause in my typing for a quarter second?
I don't think I've ever seen the VBE remove a space when I've stopped typing. It will remove trailling spaces from lines if you move to another line, but that's something different and not behaviour that I think can be altered.
There is sort of a way to turn off the auto-"correction" in the VBA Editor.
Tools
Menu -> Options
-> Editor
Tab -> Clear the Auto Syntax Check
box
Sadly, this won't solve all your problems, as the VBA Editor tends to have a mind of its own, for better or worse.
I've definitely had that issue before, where the vba editor would format as I was typing (not just when I went to another line). For me, it seemed to be related to a Microsoft Web Browser control that I had in an open workbook. When I took out the web browser, the VBA editor started acting normally again. I have no idea why that worked, but it did. Now I avoid using that control in my workbooks.
Something is causing your spreadsheet to recalculate while you are in the VBA Editor and this 'compiles' your code and thus strips the spaces. You need to stop the cells recalculating while you are editing. Turning the calculation to manual in the spreadsheet. Tools > Options > Calculation should do the trick.
I noticed this when I had cells recalculating thanks to a DDE connection.
Turn off Tools>Options>General > Background Compile. This solved it for me.
I hit this problem today on a fresh install of Excel 2010 Beta 2. None of the above made any difference, but going into the trust center and disabling all application add-ins fixed the problem for me.
I had this exact problem and the following worked for me.
- Click the Microsoft Office Button, and then click Excel Options
- Click the Add-Ins category
- In the Manage box, click COM Add-ins, and then click Go.
- Look for an add in called 'Load Test Report AddIn' then uncheck it
- restart excel
This addin is installed with VS2010 Beta2
La suppression des blancs dans l'éditeur VBA pour Access se produit lorsqu'un formulaire est ouvert en mode Formulaire ("exécution"). Cela est sans doute dû à des éxécutions en arrière plan sur base de procédures "Sur Minuterie". Fermer le formulaire dans Access, résout le problème dans VBA.