hallo zusammen,
wer kann mir bei mir bei folgendem makro die einzelnen schritte beschreiben?
sub makro()
kabb = 0
kspx = 0
k = 1
kcol = 2
krow = 1
kstream = 0
kvar = 0
kts = 0
lfound = False
kspalte = 30
kreihe = 1255
With ActiveSheet
.Cells(krow, kcol).Select
If Cells(1, kcol) = "%%CONT" Then
Do Until lfound
krow = krow + 1
If .Cells(krow, kcol).Value = "%%RES4w" Then
krow = krow + 2
lfound = True
Exit Do
End If
If krow = 10000 Then
krow = 1
lfound = True
kabb = 1
Exit Do
End If
Loop
lfound = False
Do Until lfound
If kabb = 1 Then
lfound = True
Exit Do
End If
'.Range(Cells(krow, kcol), Cells(krow, kcol + 6)).Copy
'.Cells(kreihe, kspalte).Select
'.Paste
iwer1 = Cells(krow, kcol)
iwer2 = Cells(krow, kcol + 1)
iwer3 = Cells(krow, kcol + 2)
iwer4 = Cells(krow, kcol + 3)
iwer5 = Cells(krow, kcol + 4)
iwer6 = Cells(krow, kcol + 5)
.Cells(kreihe, kspalte).Value = iwer1
.Cells(kreihe, kspalte + 1).Value = iwer2
.Cells(kreihe, kspalte + 2).Value = iwer3
.Cells(kreihe, kspalte + 3).Value = iwer4
.Cells(kreihe, kspalte + 4).Value = iwer5
.Cells(kreihe, kspalte + 5).Value = iwer6
krow = krow + 1
kspalte = kspalte + 6
If .Cells(krow, kcol).Value = "%parting" Then
kreihe = kreihe + 1
kspalte = 30
End If
If .Cells(krow, kcol).Value = "%%ZIG1" Then
lfound = True
Exit Do
End If
If krow = 10000 Then
krow = 1
lfound = True
Exit Do
End If
Loop
End If
End With
kmui = ActiveWorkbook.Name
Range("AB1250:IG1760").Select
Selection.Copy
Windows(kmappe).Activate
Sheets("TBT").Activate
Range("AB1250:IG1760").Select
ActiveSheet.Paste
Sheets("TBT").Activate
Range("B140").Select
Application.CutCopyMode = False
Sheets(ksheet).Select
Windows(kmui).Activate
ActiveWorkbook.Close 0, 0, 0
End Sub
es ist übrigens nur ein kleiner auszug aus einem größeren progr. dh falls etwas unklar ist bitte melden
danke,
gruß sebal
*Threadedit* 09:56:57
Admininfo: Führ bitte einen Thread nicht fort indem du Weitere eröffnest, und vermeide Mehrfachanfragen. Die Datenbank und User werden es dir danken. Siehe FAQ 2.