....und mal gleich noch n Update hinterher....;-)
Option Explicit
Public Sub test()
Dim astrTemp() As String, astrOutput() As String
Dim strInhalt As String
Dim ialngIndex As Long, lngColumn As Long, lngRow As Long
Application.ScreenUpdating = False
strInhalt = Sheet3.TextBox1.Value '//hier Dein Einlestext...
astrTemp = Split(Expression:=strInhalt, Delimiter:=vbCrLf)
For ialngIndex = 0 To UBound(astrTemp) Step 2
lngRow = lngRow + 1
astrOutput = Split(Expression:=astrTemp(ialngIndex), Delimiter:=" ")
Cells(lngRow, 1).Resize(1, UBound(astrOutput) + 1).Value = astrOutput()
Next
With Cells(1, 1).Resize(ialngIndex, UBound(astrOutput) + 1)
For lngColumn = 1 To .Columns.Count
With .Columns(lngColumn)
Call .TextToColumns(Destination:=.Cells(1, 1), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
:=Array(1, 1), TrailingMinusNumbers:=True)
End With
Next
End With
Application.ScreenUpdating = True
End Sub
Gruß,
|