Formatting of posted VBA code

  • I asked this question a while back but I didn't get a solution so I thought that I would try again. When I post code using code tags in a response to a question, the code loses its 'indentation' formatting. Immediately after it is posted, it seems to retain the formatting. However, when the post is closed and then re-accessed, the 'indentation' formatting is gone. Please refer to my response in Post #2 at this link:


    VBA Macros code - copy paste transposed loop - Excel VBA / Macros - OzGrid Free Excel/VBA Help Forum


    You will note that the 'indentation' that was there in my original post, is no longer there. This creates a problem when someone copies/pastes the code. The formatting has to be re-entered manually. Does anyone have any suggestions as to why this happens?

    You can say "THANK YOU" for help received by clicking the :thumbup: icon in the bottom right corner of the helper's post.
    Practice makes perfect. I am very far from perfect so I'm still practising.


  • NOT AN ISSUE HERE ....

  • I don't see any indentation.

    You can say "THANK YOU" for help received by clicking the :thumbup: icon in the bottom right corner of the helper's post.
    Practice makes perfect. I am very far from perfect so I'm still practising.

  • Well ... that IS very interesting. On my side the indentation was there for viewings by me. What I mean is I had

    left this website several times and returned to my posting with the indentation still in effect.


    Now of course, the indentation is gone.


    OZGRID ... WHAT IS HAPPENING ????

  • If your code is indented before posting then add the code tags and paste the code between them. I've found that if you paste the code before adding code tags the indentation will not work.

  • I always add the code tags first and then the code between them. Unfortunately, this doesn't solve the problem. The indentation still disappears.

    You can say "THANK YOU" for help received by clicking the :thumbup: icon in the bottom right corner of the helper's post.
    Practice makes perfect. I am very far from perfect so I'm still practising.

  • Have you tried posting the code with the formatting, logging out, closing your browser, re-opening it and then re-opening your post? All I can tell you is that when I do this the formatting disappears. I believe that Logit has the same problem.

    You can say "THANK YOU" for help received by clicking the :thumbup: icon in the bottom right corner of the helper's post.
    Practice makes perfect. I am very far from perfect so I'm still practising.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!