Really Mike, I should tell tou to go to the Test Forum and play with the options yourself but I will show some
First of all
If I'm in the VBE don't I organize the lines in my code; to made them easy to read?
Of course you do (and still need to). The issue is how the Vbullitin software interprets what you have typed.
What I have done below is put in the same code multiple times some indented and some not, with a line above saying how each have been put on the board.
Each piece of code follows the same layout i.e have a line explaining how each have been put on the board and then the code on the immediate next line.
No indent, no code tags
Sub TxtCol()
Dim c As Long, LstCo As Long
Application.ScreenUpdating = 0
Cells.UnMerge
LstCo = Cells.Find(What:="*", SearchOrder:=xlColumns, SearchDirection:=xlPrevious, LookIn:=xlValues).Column
For c = 1 To LstCo
On Error Resume Next
With Columns(c)
.TextToColumns Destination:=Cells(1, c), DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
:=Array(1, 1), TrailingMinusNumbers:=True
.HorizontalAlignment = xlGeneral
End With
Next
On Error GoTo 0
Application.ScreenUpdating = 1
End Sub
No indent, with code tags
Code:
Sub TxtCol()
Dim c As Long, LstCo As Long
Application.ScreenUpdating = 0
Cells.UnMerge
LstCo = Cells.Find(What:="*", SearchOrder:=xlColumns, SearchDirection:=xlPrevious, LookIn:=xlValues).Column
For c = 1 To LstCo
On Error Resume Next
With Columns(c)
.TextToColumns Destination:=Cells(1, c), DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
:=Array(1, 1), TrailingMinusNumbers:=True
.HorizontalAlignment = xlGeneral
End With
Next
On Error GoTo 0
Application.ScreenUpdating = 1
End Sub
Indented, without code tags
Sub TxtCol()
Dim c As Long, LstCo As Long
Application.ScreenUpdating = 0
Cells.UnMerge
LstCo = Cells.Find(What:="*", SearchOrder:=xlColumns, SearchDirection:=xlPrevious, LookIn:=xlValues).Column
For c = 1 To LstCo
On Error Resume Next
With Columns(c)
.TextToColumns Destination:=Cells(1, c), DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
:=Array(1, 1), TrailingMinusNumbers:=True
.HorizontalAlignment = xlGeneral
End With
Next
On Error GoTo 0
Application.ScreenUpdating = 1
End Sub
Indented with code tags
Code:
Sub TxtCol()
Dim c As Long, LstCo As Long
Application.ScreenUpdating = 0
Cells.UnMerge
LstCo = Cells.Find(What:="*", SearchOrder:=xlColumns, SearchDirection:=xlPrevious, LookIn:=xlValues).Column
For c = 1 To LstCo
On Error Resume Next
With Columns(c)
.TextToColumns Destination:=Cells(1, c), DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
:=Array(1, 1), TrailingMinusNumbers:=True
.HorizontalAlignment = xlGeneral
End With
Next
On Error GoTo 0
Application.ScreenUpdating = 1
End Sub
And just because you mention Quote tags
Indented with quote tags
Sub TxtCol()
Dim c As Long, LstCo As Long
Application.ScreenUpdating = 0
Cells.UnMerge
LstCo = Cells.Find(What:="*", SearchOrder:=xlColumns, SearchDirection:=xlPrevious, LookIn:=xlValues).Column
For c = 1 To LstCo
On Error Resume Next
With Columns(c)
.TextToColumns Destination:=Cells(1, c), DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
:=Array(1, 1), TrailingMinusNumbers:=True
.HorizontalAlignment = xlGeneral
End With
Next
On Error GoTo 0
Application.ScreenUpdating = 1
End Sub
As you can see Quote tags lose the indenting.
And finally With the VBHtml maker (although you won't be able to use this but it will save you asking later).
Rich (BB code):
Sub TxtCol()
Dim c As Long, LstCo As Long
Application.ScreenUpdating = 0
Cells.UnMerge
LstCo = Cells.Find(What:="*", SearchOrder:=xlColumns, SearchDirection:=xlPrevious, LookIn:=xlValues).Column
For c = 1 To LstCo
On Error Resume Next
With Columns(c)
.TextToColumns Destination:=Cells(1, c), DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
:=Array(1, 1), TrailingMinusNumbers:=True
.HorizontalAlignment = xlGeneral
End With
Next
On Error GoTo 0
Application.ScreenUpdating = 1
End Sub
I will let you judge the differences yourself (test including adjusting your zoom settings and pasting the codes above into your VBE) and like I said you can experiment yourself further in the Test Forum.