Formatting of posted code using the </> symbol

  • Problem:

    I post code using the </> symbol. When I re-open the thread, copy the code and then paste the code in the VBA Editor, all the formatting is lost. All the lines of code are left aligned, the lines are double spaces and the indentations are gone. Here is an example:

    Code
    1. Sub test()
    2. With Range("A1")
    3. .Copy Range("A2")
    4. End With
    5. End Sub

    This code was entered single spaced with indentations but that formatting is now gone. Am I using the wrong code icon (</>) ?

    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.

  • Hello Mumps


    Hopefully Sam  S O who is THE Administrator will take a look at your thread ...


    or you could drop this message to his wall ...

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Thumbs Up" icon, below, in the bottom right corner:)

  • Thank you, Carim. I have done that.

    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.

  • Hi @SO. I am using Windows 10 with Edge. I'm not sure what you mean by "meta forum".

    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.

  • Thank you, Roy.

    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.

  • I was wondering if anyone has any suggestions. Thank you.

    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.

  • I have tried that without success. When I open a thread that contains code, it appears without any indentation in that thread even though it was posted with the indentation included. Another problem I'm having is that I cannot manually copy/paste text from one post to another or even within the same post. I'm wondering if the problems are related.

    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.

  • Unfortunately, the copy icon doesn't work for me.

    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.

  • Unfortunately, the problem is still there.

    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.

  • Hello people,


    Just backing Mumps up here. I have the same problems. Its no big deal but it just looks untidy. I'm assuming that if an OP copies/pastes a supplied code, it will just be all lined up, line after line beneath the next with all spacings and indentations gone.


    I tested this myself in a thread I've replied to in the VBA/Macros forum by writing the code in a Module, copy/pasting it to the thread, deleting it from the module and then copy/pasting it back to the module from the thread. The result is as Mumps has described.


    Just my two cents' worth.


    Cheerio,

    vcoolio.

  • vcoolio

    Thanks for the support. It can become quite frustrating.

    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.

  • I have tried that without success. When I open a thread that contains code, it appears without any indentation in that thread even though it was posted with the indentation included. Another problem I'm having is that I cannot manually copy/paste text from one post to another or even within the same post. I'm wondering if the problems are related.

    Mumps/vcoolio,


    Can you provide a screenshot of what you're seeing? Also if you can provide screenshot(s) of what you're copy/pasting vs. what the post renders afterwards that would be helpful.