In die tabelle eingeben
03.03.2004 09:23:33
LUCIEN
Ich habe folgenden Code :
Dim c As Control
Sheets("base tableau").Select
Range("A5") = TextBox1.Value
Range("B5") = TextBox2.Value
Range("C5") = TextBox6.Value
Range("D5") = TextBox3.Value
Range("E5") = TextBox4.Value
Range("F5") = TextBox5.Value
Range("J5") = TextBox7.Value
Range("K5") = TextBox8.Value
Range("L5") = TextBox9.Value
Range("I5") = TextBox10.Value
For Each c In Entree.Controls
If TypeName(c) Like "Text*" Then c.Value = ""
Next c
Das klappt auch ganz gut, nur möchte ich, dass Excel nun in der tabelle eine reihe darunter springt.
Nun müsste der Code heissen:
Dim c As Control
Sheets("base tableau").Select
Range("A6") = TextBox1.Value
Range("B6") = TextBox2.Value
Range("C6") = TextBox6.Value
Range("D6") = TextBox3.Value
Range("E6") = TextBox4.Value
Range("F6") = TextBox5.Value
Range("J6") = TextBox7.Value
Range("K6") = TextBox8.Value
Range("L6") = TextBox9.Value
Range("I6") = TextBox10.Value
For Each c In Entree.Controls
If TypeName(c) Like "Text*" Then c.Value = ""
Next c
Das ist sehr aufwendig zumal die tabelle lang ist
Kann man das automatisieren?
danke für eure tipps