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

With...End With

Forumthread: With...End With

With...End With
12.08.2005 08:52:48
Josef
Hallo!
Ich habe folgenden Code:
With Sheets("Binf neu (2)").Cells(Range("AE65536").End(xlUp).Row + 1, 31)
.Value = fBHZ.bhztxt6.Text
End With
With Sheets("Binf neu (2)").Cells(Range("AE65536").End(xlUp).Row + 1, 31)
.Value = fBHZ.bhztxt6.Text
End With
Kann man bitte den Code so kürzen dass "With Sheets("Binf neu (2)")." und "End With" nur einmal vorkommt und dazwischen der code für die Textboxen ist?
Wo müßte ich hier bitte etwas ändern?
So funktioniert es leider nicht.
With Sheets("Binf neu (2)")
.Cells(Range("AE65536").End(xlUp).Row + 1, 31)
.Value = fBHZ.bhztxt6.Text
.Cells(Range("AE65536").End(xlUp).Row + 1, 31)
.Value = fBHZ.bhztxt6.Text
End With
Danke
Josef
Anzeige

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

Betreff
Datum
Anwender
Anzeige
AW: With...End With richtiger Code
12.08.2005 08:58:07
Josef
Hallo!
Sorry Irrtum meinerseits
With Sheets("Binf neu (2)").Cells(Range("AE65536").End(xlUp).Row + 1, 31)
.Value = fBHZ.bhztxt6.Text
End With
With Sheets("Binf neu (2)").Cells(Range("AF65536").End(xlUp).Row + 1, 32)
.Value = fBHZ.bhztxt7.Text
End With
Josef
AW: With...End With richtiger Code
12.08.2005 09:33:55
Ramses
Hallo
With Sheets("Binf neu (2)")
.Cells(Range("AE65536").End(xlUp).Row + 1, 31).Value = fBHZ.bhztxt6.Text
.Cells(Range("AE65536").End(xlUp).Row + 1, 31).Value = fBHZ.bhztxt6.Text
End With
Ungetestet, sollte aber tun
Gruss Rainer
Anzeige
AW: With...End With richtiger Code
12.08.2005 09:42:03
Josef
Hallo Ramses!
Danke für Deine Antwort und Deine Lösung.
Josef
Anzeige
Anzeige
Live-Forum - Die aktuellen Beiträge
Datum
Titel
14.05.2026 13:31:09
14.05.2026 09:50:42
13.05.2026 19:14:18