Anzeige
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
Inhaltsverzeichnis

Schleife 17 x

Forumthread: Schleife 17 x

Schleife 17 x
04.08.2002 16:36:46
Max M.
Hallo Leute,

wie kann ich dieses Makro in einer Schleife 17 mal durchlaufen lassen???

Sub Test()

With Range("C9")
.Borders(xlEdgeRight).LineStyle = xlContinuous
.Borders(xlEdgeRight).ColorIndex = 2
.Borders(xlEdgeBottom).LineStyle = xlContinuous
.Borders(xlEdgeBottom).ColorIndex = 2
.Borders(xlEdgeLeft).LineStyle = xlContinuous
.Borders(xlEdgeLeft).ColorIndex = 16
.Borders(xlEdgeTop).LineStyle = xlContinuous
.Borders(xlEdgeTop).ColorIndex = 16

.Offset(0, 2).Select
End With

End Sub

Max M.

Anzeige

3
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
Re: Schleife 17 x
04.08.2002 16:41:03
andreas e
ungetestet:
z=3
for i = 1 to 17
With cells(9,z)
.Borders(xlEdgeRight).LineStyle = xlContinuous
.Borders(xlEdgeRight).ColorIndex = 2
.Borders(xlEdgeBottom).LineStyle = xlContinuous
.Borders(xlEdgeBottom).ColorIndex = 2
.Borders(xlEdgeLeft).LineStyle = xlContinuous
.Borders(xlEdgeLeft).ColorIndex = 16
.Borders(xlEdgeTop).LineStyle = xlContinuous
.Borders(xlEdgeTop).ColorIndex = 16
End With
z=z+2

next

gruß
andreas e

Anzeige
Re: Schleife 17 x
04.08.2002 16:43:28
Hajo_Zi
Hallo Max

immmer die Aufgabe komplett beschreiben dann braucht man nich soviel vermuten, was du willst. Du möchtest bestimmt nicht 17 mal die Zelle C9 formatieren.

Gruß Hajo

Re: Schleife 17 x
04.08.2002 16:48:40
Max M.
Vielen Dank für die Hilfe.
;

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige