Do While Not rst.EOF
st = 0
Do While st <> 1 and Not rst.EOF
st = rst![PE_ID]
If st = 1 Then
obj.ActiveSheet.Cells(1, i).Value = rst![VIAs]
obj.ActiveSheet.Cells(j, i).Value = rst![Inhalt]
Else
obj.ActiveSheet.Cells(j, i).Value = rst![Inhalt]
End If
j = j + 1
rst.MoveNext
if Not rst.EOF then st = rst![PE_ID]
Loop
i = i + 1
j = 2
Loop
|