What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 127 Stack Exchange communities.

Possible Duplicates:
How about newlines within comments?
Allow HTML tags in comments
How do comments work?
Stack Overflow comments don't have formatting tags or line breaks?
Code in comment is all on one line
Can you put code snippets in comments?
Why can you type new lines in comments if they are never rendered?
How can I add new line in a comment?

I want to add multiline code to my Stack Overflow comments but Stack Overflow parses everything to one line. I tried the two spaces

below is the code

            Set objApp = CreateObject("Excel.Application")
            objApp.Visible = True
            Set wb = objApp.Workbooks.Open("template.xls", True, False)
            wb.Sheets(1).Rows(3).Delete
            wb.Sheets(1).Range("A1").Value = title

            objApp.Cells.Select
            objApp.Selection.Borders(xlDiagonalDown).LineStyle = xlNone
            objApp.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
            With objApp.Selection.Borders(xlEdgeLeft)
                .LineStyle = xlContinuous
                .ColorIndex = 0
                .TintAndShade = 0
                .Weight = xlThin
            End With
share|improve this question

migrated from stackoverflow.com Aug 23 '11 at 18:27

This question came from our site for professional and enthusiast programmers.

marked as duplicate by Dori Aug 24 '11 at 6:08

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
No. And I think you should lurk 'round here for a bit. Posting meta questions on SO is a common mistake for NKOTB. –  Won't Aug 23 '11 at 18:58
add comment

3 Answers

up vote 6 down vote accepted

If you are wanting to add code into a comment then you are doing it wrong.

You should be either editing it into your question/answer or posting it as an answer.

Comments are designed for someone to ask the post owner for clarification. The post owner should then update their post with the requested information. You could then reply to the comment saying you've made the update just to make sure they see it.

share|improve this answer
add comment

Not possible. Comments are all one lines only.

share|improve this answer
add comment

You will have to use Pastebin or put it in a question edit or answer. You cannot have multi-line code in a comment.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged .