Live-Forum - Die aktuellen Beiträge
Anzeige
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
Inhaltsverzeichnis

wo next i platzieren

Forumthread: wo next i platzieren

wo next i platzieren
22.05.2005 21:17:14
eva
Hallo,
habe die bekannte Fehlermeldung "next ohne for". Wo muss ich die end ifs und das next ztmaster platzieren?
For ztmaster = 5 To 150
docview.Cells(ztdv, 1) = toolset.Cells(ztmaster, 115) 'vendor A
docview.Cells(ztdv, 2) = toolset.Cells(ztmaster, 14) 'area
docview.Cells(ztdv, 3) = toolset.Cells(ztmaster, 15) 'module
toolset.Range(toolset.Cells(ztmaster, 98), toolset.Cells(ztmaster, 104)).Copy docview.Cells(ztdv, 4)
If Not docview.Cells(ztdv, 5) = "" Then
If docview.Cells(ztdv, 6) = "" Or docview.Cells(ztdv, 7) = "" Or docview.Cells(ztdv, 8) = "" Or docview.Cells(ztdv, 9) = "" Or docview.Cells(ztdv, 10) = "" Then
docview.Range(6, 10).Interior.ColorIndex = 3
If Not docview.Cells(ztdv, 6) = "" Or docview.Cells(ztdv, 7) = "" Or docview.Cells(ztdv, 8) = "" Or docview.Cells(ztdv, 9) = "" Or docview.Cells(ztdv, 10) = "" Then
docview.Range(6, 10).Interior.ColorIndex = 4
ztdv = ztdv + 1
Next ztmaster
Danke und Gruß
Eva
Anzeige

6
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
Hier kommt kein "i" vor. Gesamter Code nötig. o.T
22.05.2005 21:20:01
Ramses
...
AW: wo next i platzieren
22.05.2005 21:20:35
Hajo_Zi
Hallo Eva,
arbeite mit einrückungen, dann fällt es Dir auch auf

For ztmaster = 5 To 150
docview.Cells(ztdv, 1) = toolset.Cells(ztmaster, 115) 'vendor A
docview.Cells(ztdv, 2) = toolset.Cells(ztmaster, 14) 'area
docview.Cells(ztdv, 3) = toolset.Cells(ztmaster, 15) 'module
toolset.Range(toolset.Cells(ztmaster, 98), toolset.Cells(ztmaster, 104)).Copy docview.Cells(ztdv, 4)
If Not docview.Cells(ztdv, 5) = "" Then
If docview.Cells(ztdv, 6) = "" Or docview.Cells(ztdv, 7) = "" Or docview.Cells(ztdv, 8) = "" Or _
docview.Cells(ztdv, 9) = "" Or docview.Cells(ztdv, 10) = "" Then
docview.Range(6, 10).Interior.ColorIndex = 3
If Not docview.Cells(ztdv, 6) = "" Or docview.Cells(ztdv, 7) = "" Or _
docview.Cells(ztdv, 8) = "" Or docview.Cells(ztdv, 9) = "" Or docview.Cells(ztdv, 10) = "" Then
docview.Range(6, 10).Interior.ColorIndex = 4
ztdv = ztdv + 1
End If
End If
End If
Next ztmaster

Bitte keine Mail, Probleme sollten im Forum gelöst werden.
Microsoft MVP für Excel
Das Forum lebt auch von den Rückmeldungen.
Betriebssystem XP Home SP2 und Excel Version 2003 SP1.



"Wer Rechtschreibfehler findet, darf sie behalten!"
Dies gilt auch für Bert.
Anzeige
Danke sehr. (oT)
22.05.2005 21:24:41
eva
vvv
By the way....
22.05.2005 21:27:35
Ramses
Hallo
den Code hatten wir doch schon mal komplett überarbeitet ?
Warum arbeitest du jetzt wieder mit dem alten ?
Gruss Rainer
AW: By the way....
22.05.2005 21:34:08
eva
Hallo Rainer,
es gibt eine neue Anforderung und da ich kein Profi bin - schreibe ich den Ablauf für mich verständlich auf - und kürze dann mit euren bisherigen Tipps im Nachhinein, um was zu lernen.
e.g. toolset.Range(toolset.Cells(ztmaster, 98), toolset.Cells(ztmaster, 104)).Copy docview.Cells(ztdv, 4) ... Dies habe ich -wohl mehr für mich als für dich erfolgreich übernommen-.
Gruß
Eva
Anzeige
AW: wo next i platzieren
22.05.2005 21:22:28
Franz
Hallo Eva,
ungetestet, aber ich denke mal so:
For ztmaster = 5 To 150
docview.Cells(ztdv, 1) = toolset.Cells(ztmaster, 115) 'vendor A
docview.Cells(ztdv, 2) = toolset.Cells(ztmaster, 14) 'area
docview.Cells(ztdv, 3) = toolset.Cells(ztmaster, 15) 'module
toolset.Range(toolset.Cells(ztmaster, 98), toolset.Cells(ztmaster, 104)).Copy docview.Cells(ztdv, 4)
If Not docview.Cells(ztdv, 5) = "" Then
If docview.Cells(ztdv, 6) = "" Or docview.Cells(ztdv, 7) = "" Or docview.Cells(ztdv, 8) = "" Or docview.Cells(ztdv, 9) = "" Or docview.Cells(ztdv, 10) = "" Then
docview.Range(6, 10).Interior.ColorIndex = 3
end if
If Not docview.Cells(ztdv, 6) = "" Or docview.Cells(ztdv, 7) = "" Or docview.Cells(ztdv, 8) = "" Or docview.Cells(ztdv, 9) = "" Or docview.Cells(ztdv, 10) = "" Then
docview.Range(6, 10).Interior.ColorIndex = 4
ztdv = ztdv + 1
end if
end if
Next ztmaster
Grüße
Franz
Anzeige
;

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Entdecke mehr
Finde genau, was du suchst

Die erweiterte Suchfunktion hilft dir, gezielt die besten Antworten zu finden

Suche nach den besten Antworten
Unsere beliebtesten Threads

Entdecke unsere meistgeklickten Beiträge in der Google Suche

Top 100 Threads jetzt ansehen
Anzeige