Posting Tables and VBA Code With The Pre Tag


By: DerbyDad03
November 4, 2010

To line up the data/table(s) or VBA code in your post on Computing.Net, use the <pre> tag found above the Reply box.

Step 1. Click the <pre> icon found above the Reply box.
Step 2. Enter your data/table(s) or VBA code between the tags.
Step 3. Click Preview Follow Up to see if you like the way it looks.
Step 4. If you need to fix the layout, fix it in the Message box below the Preview box.
Step 5. Click the Preview Further Changes Button

Repeat steps 4 – 5 as often as necessary until you like the way the post looks.

Step 6. Click either Confirm button to Post your response

When you are done, your data should look something like this. Note how the columns all line up.

    A      B       C
1   Tom    Blue    3
2   Sue    Red     9
3   Fred   Green   7


Your code should look something like this. Note how the indentation is maintained.

Option Explicit
Private Sub ColorNumbers()
Dim rw As Integer
  For rw = 1 To 56
   Cells(rw, 1).Formula = rw
   Cells(rw, 2).Interior.ColorIndex = rw
  Next
 MsgBox "Your List Of Color Index Values Is Complete"
End Sub


Need more help?
Describe your Problem
Example: Hard Drive Not Detected on My PC

Ask Question