Usually, when selecting the code (of course, in edit mode) and pressing Ctrl+K, or {}, the selection is correctly formatted as code:
Sub Foo()
'Whatever in here...
End Sub
But sometimes, the above way of formatting, simply does not work! The code is moved for one Tab space, but it looks messed up.
In such a situation I use the next (less elegant) way, using ``:
Sub Foo() 'Whatever in here... End Sub
Is it a trick, something to be known, in order to avoid such a behavior?
I searched for such a clarification, but I could not find anything conclusive. A link to a place supplying a solution for the above described issue will be good enough.
Edited:
Using ``` on the lines in front and after the code:
Sub Foo()
'Whatever in here...
End Sub