I have an Excel spreadsheet that is generated from a flat file. The file has different sections with group totals. I have set up a macro to import the data and place it onto different sheets.
however, the data is comma seperated. I am trying to loop though each worksheet, and use the texttocolumns method. however, i am unable to loop through the sheets.
i will post code dealing with looping through the sheets, since the macro works correctly up to this point
i have placed msgboxes at the start of the loop, and i only get 1 iteration of the loop.
any suggestions?
however, the data is comma seperated. I am trying to loop though each worksheet, and use the texttocolumns method. however, i am unable to loop through the sheets.
i will post code dealing with looping through the sheets, since the macro works correctly up to this point
Code:
For Each ws In ThisWorkbook.Worksheets
With ws
If ActiveSheet.Name <> "Sheet6" Then
Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=True, Space:=False, Other:=False, FieldInfo _
:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1)), _
TrailingMinusNumbers:=True
End If
End With
Next ws
i have placed msgboxes at the start of the loop, and i only get 1 iteration of the loop.
any suggestions?