03.11.2018, 19:04
(Dieser Beitrag wurde zuletzt bearbeitet: 03.11.2018, 21:25 von WillWissen.
Bearbeitungsgrund: Codetags
)
Schön Guten Abend Liebe Excel freunde,
Ich habe weit über Hundert Textboxen. wo einzeln Daten eingegeben werden und diese dann in bestimmte Zellen geschrieben werden. Bis her befülle ich die Zellen mit den jeweiligen bezug zur jeweiligen Textboxen einzeln.
Der Auslöser damit alle Textboxen Ihre Daten in das Tabellenblatt Kopieren, wird per Commandbutton ausgelöst. Der Kopiervorgang dauert nur leider ewig...... ein oder zwei mal ist Excel auch schon ab gestürzt.
Daher die frage, gibt es eine bessere bzw. Saubere Methode die Daten an die Zellen zu Übertragen ?
Hier wär der Code, wie ich es bis her an die Zellen gebe. Vielleicht könnt Ihr mir ja helfen.
beste Grüße und Danke schon mal für eure Zeit.
Ich habe weit über Hundert Textboxen. wo einzeln Daten eingegeben werden und diese dann in bestimmte Zellen geschrieben werden. Bis her befülle ich die Zellen mit den jeweiligen bezug zur jeweiligen Textboxen einzeln.
Der Auslöser damit alle Textboxen Ihre Daten in das Tabellenblatt Kopieren, wird per Commandbutton ausgelöst. Der Kopiervorgang dauert nur leider ewig...... ein oder zwei mal ist Excel auch schon ab gestürzt.
Daher die frage, gibt es eine bessere bzw. Saubere Methode die Daten an die Zellen zu Übertragen ?
Hier wär der Code, wie ich es bis her an die Zellen gebe. Vielleicht könnt Ihr mir ja helfen.
beste Grüße und Danke schon mal für eure Zeit.
Code:
Private Sub CB_Safe1_Click()
'Daten Produkte kopieren______________________________________________________________________________
Sheets("Materialkosten").Cells(10, 1) = TextBox91.Text
Sheets("Materialkosten").Cells(11, 1) = TextBox92.Text
Sheets("Materialkosten").Cells(12, 1) = TextBox93.Text
Sheets("Materialkosten").Cells(13, 1) = TextBox94.Text
Sheets("Materialkosten").Cells(14, 1) = TextBox95.Text
Sheets("Materialkosten").Cells(15, 1) = TextBox96.Text
Sheets("Materialkosten").Cells(16, 1) = TextBox97.Text
Sheets("Materialkosten").Cells(17, 1) = TextBox98.Text
Sheets("Materialkosten").Cells(18, 1) = TextBox99.Text
Sheets("Materialkosten").Cells(19, 1) = TextBox100.Text
Sheets("Materialkosten").Cells(20, 1) = TextBox101.Text
Sheets("Materialkosten").Cells(21, 1) = TextBox102.Text
Sheets("Materialkosten").Cells(22, 1) = TextBox103.Text
Sheets("Materialkosten").Cells(23, 1) = TextBox104.Text
Sheets("Materialkosten").Cells(24, 1) = TextBox105.Text
Sheets("Materialkosten").Cells(25, 1) = TextBox106.Text
Sheets("Materialkosten").Cells(26, 1) = TextBox107.Text
Sheets("Materialkosten").Cells(27, 1) = TextBox108.Text
Sheets("Materialkosten").Cells(28, 1) = TextBox109.Text
Sheets("Materialkosten").Cells(29, 1) = TextBox110.Text
'Menge Kopieren______________________________________________________________________________________
Sheets("Materialkosten").Cells(10, 2) = TextBox9.Text
Sheets("Materialkosten").Cells(11, 2) = TextBox10.Text
Sheets("Materialkosten").Cells(12, 2) = TextBox11.Text
Sheets("Materialkosten").Cells(13, 2) = TextBox12.Text
Sheets("Materialkosten").Cells(14, 2) = TextBox13.Text
Sheets("Materialkosten").Cells(15, 2) = TextBox14.Text
Sheets("Materialkosten").Cells(16, 2) = TextBox15.Text
Sheets("Materialkosten").Cells(17, 2) = TextBox16.Text
Sheets("Materialkosten").Cells(18, 2) = TextBox17.Text
Sheets("Materialkosten").Cells(19, 2) = TextBox18.Text
Sheets("Materialkosten").Cells(20, 2) = TextBox19.Text
Sheets("Materialkosten").Cells(21, 2) = TextBox20.Text
Sheets("Materialkosten").Cells(22, 2) = TextBox21.Text
Sheets("Materialkosten").Cells(23, 2) = TextBox22.Text
Sheets("Materialkosten").Cells(24, 2) = TextBox23.Text
Sheets("Materialkosten").Cells(25, 2) = TextBox24.Text
Sheets("Materialkosten").Cells(26, 2) = TextBox25.Text
Sheets("Materialkosten").Cells(27, 2) = TextBox26.Text
Sheets("Materialkosten").Cells(28, 2) = TextBox27.Text
Sheets("Materialkosten").Cells(29, 2) = TextBox28.Text
'Daten Lieferant Copy______________________________________________________________________________
Sheets("Materialkosten").Cells(10, 3) = TextBox112.Text
Sheets("Materialkosten").Cells(11, 3) = TextBox113.Text
Sheets("Materialkosten").Cells(12, 3) = TextBox114.Text
Sheets("Materialkosten").Cells(13, 3) = TextBox115.Text
Sheets("Materialkosten").Cells(14, 3) = TextBox116.Text
Sheets("Materialkosten").Cells(15, 3) = TextBox117.Text
Sheets("Materialkosten").Cells(16, 3) = TextBox118.Text
Sheets("Materialkosten").Cells(17, 3) = TextBox119.Text
Sheets("Materialkosten").Cells(18, 3) = TextBox120.Text
Sheets("Materialkosten").Cells(19, 3) = TextBox121.Text
Sheets("Materialkosten").Cells(20, 3) = TextBox122.Text
Sheets("Materialkosten").Cells(21, 3) = TextBox123.Text
Sheets("Materialkosten").Cells(22, 3) = TextBox124.Text
Sheets("Materialkosten").Cells(23, 3) = TextBox125.Text
Sheets("Materialkosten").Cells(24, 3) = TextBox126.Text
Sheets("Materialkosten").Cells(25, 3) = TextBox127.Text
Sheets("Materialkosten").Cells(26, 3) = TextBox128.Text
Sheets("Materialkosten").Cells(27, 3) = TextBox129.Text
Sheets("Materialkosten").Cells(28, 3) = TextBox130.Text
Sheets("Materialkosten").Cells(29, 3) = TextBox151.Text
'Daten Artikel Nr. Copy______________________________________________________________________________
Sheets("Materialkosten").Cells(10, 4) = TextBox132.Text
Sheets("Materialkosten").Cells(11, 4) = TextBox133.Text
Sheets("Materialkosten").Cells(12, 4) = TextBox134.Text
Sheets("Materialkosten").Cells(13, 4) = TextBox135.Text
Sheets("Materialkosten").Cells(14, 4) = TextBox136.Text
Sheets("Materialkosten").Cells(15, 4) = TextBox137.Text
Sheets("Materialkosten").Cells(16, 4) = TextBox138.Text
Sheets("Materialkosten").Cells(17, 4) = TextBox139.Text
Sheets("Materialkosten").Cells(18, 4) = TextBox140.Text
Sheets("Materialkosten").Cells(19, 4) = TextBox141.Text
Sheets("Materialkosten").Cells(20, 4) = TextBox142.Text
Sheets("Materialkosten").Cells(21, 4) = TextBox143.Text
Sheets("Materialkosten").Cells(22, 4) = TextBox144.Text
Sheets("Materialkosten").Cells(23, 4) = TextBox145.Text
Sheets("Materialkosten").Cells(24, 4) = TextBox146.Text
Sheets("Materialkosten").Cells(25, 4) = TextBox147.Text
Sheets("Materialkosten").Cells(26, 4) = TextBox148.Text
Sheets("Materialkosten").Cells(27, 4) = TextBox149.Text
Sheets("Materialkosten").Cells(28, 4) = TextBox150.Text
Sheets("Materialkosten").Cells(29, 4) = TextBox152.Text
'Daten Gebindepreis. Kopieren______________________________________________________________________________
Sheets("Materialkosten").Cells(10, 5) = TextBox70.Text
Sheets("Materialkosten").Cells(11, 5) = TextBox71.Text
Sheets("Materialkosten").Cells(12, 5) = TextBox72.Text
Sheets("Materialkosten").Cells(13, 5) = TextBox73.Text
Sheets("Materialkosten").Cells(14, 5) = TextBox74.Text
Sheets("Materialkosten").Cells(15, 5) = TextBox75.Text
Sheets("Materialkosten").Cells(16, 5) = TextBox76.Text
Sheets("Materialkosten").Cells(17, 5) = TextBox77.Text
Sheets("Materialkosten").Cells(18, 5) = TextBox78.Text
Sheets("Materialkosten").Cells(19, 5) = TextBox79.Text
Sheets("Materialkosten").Cells(20, 5) = TextBox80.Text
Sheets("Materialkosten").Cells(21, 5) = TextBox81.Text
Sheets("Materialkosten").Cells(22, 5) = TextBox82.Text
Sheets("Materialkosten").Cells(23, 5) = TextBox83.Text
Sheets("Materialkosten").Cells(24, 5) = TextBox84.Text
Sheets("Materialkosten").Cells(25, 5) = TextBox85.Text
Sheets("Materialkosten").Cells(26, 5) = TextBox86.Text
Sheets("Materialkosten").Cells(27, 5) = TextBox87.Text
Sheets("Materialkosten").Cells(28, 5) = TextBox88.Text
Sheets("Materialkosten").Cells(29, 5) = TextBox89.Text
' Copy Putzverlust_______________________________________________________________________________
Sheets("Materialkosten").Cells(10, 8) = TextBox30.Text
Sheets("Materialkosten").Cells(11, 8) = TextBox31.Text
Sheets("Materialkosten").Cells(12, 8) = TextBox32.Text
Sheets("Materialkosten").Cells(13, 8) = TextBox33.Text
Sheets("Materialkosten").Cells(14, 8) = TextBox34.Text
Sheets("Materialkosten").Cells(15, 8) = TextBox35.Text
Sheets("Materialkosten").Cells(16, 8) = TextBox36.Text
Sheets("Materialkosten").Cells(17, 8) = TextBox37.Text
Sheets("Materialkosten").Cells(18, 8) = TextBox38.Text
Sheets("Materialkosten").Cells(19, 8) = TextBox39.Text
Sheets("Materialkosten").Cells(20, 8) = TextBox40.Text
Sheets("Materialkosten").Cells(21, 8) = TextBox41.Text
Sheets("Materialkosten").Cells(22, 8) = TextBox42.Text
Sheets("Materialkosten").Cells(23, 8) = TextBox43.Text
Sheets("Materialkosten").Cells(24, 8) = TextBox44.Text
Sheets("Materialkosten").Cells(25, 8) = TextBox45.Text
Sheets("Materialkosten").Cells(26, 8) = TextBox46.Text
Sheets("Materialkosten").Cells(27, 8) = TextBox47.Text
Sheets("Materialkosten").Cells(28, 8) = TextBox48.Text
Sheets("Materialkosten").Cells(29, 8) = TextBox49.Text
' Kopieren Garverlust_____________________________________________________________
Sheets("Materialkosten").Cells(10, 9) = TextBox50.Text
Sheets("Materialkosten").Cells(11, 9) = TextBox51.Text
Sheets("Materialkosten").Cells(12, 9) = TextBox52.Text
Sheets("Materialkosten").Cells(13, 9) = TextBox53.Text
Sheets("Materialkosten").Cells(14, 9) = TextBox54.Text
Sheets("Materialkosten").Cells(15, 9) = TextBox55.Text
Sheets("Materialkosten").Cells(16, 9) = TextBox56.Text
Sheets("Materialkosten").Cells(17, 9) = TextBox57.Text
Sheets("Materialkosten").Cells(18, 9) = TextBox58.Text
Sheets("Materialkosten").Cells(19, 9) = TextBox59.Text
Sheets("Materialkosten").Cells(20, 9) = TextBox60.Text
Sheets("Materialkosten").Cells(21, 9) = TextBox61.Text
Sheets("Materialkosten").Cells(22, 9) = TextBox62.Text
Sheets("Materialkosten").Cells(23, 9) = TextBox63.Text
Sheets("Materialkosten").Cells(24, 9) = TextBox64.Text
Sheets("Materialkosten").Cells(25, 9) = TextBox65.Text
Sheets("Materialkosten").Cells(26, 9) = TextBox66.Text
Sheets("Materialkosten").Cells(27, 9) = TextBox67.Text
Sheets("Materialkosten").Cells(28, 9) = TextBox68.Text
Sheets("Materialkosten").Cells(29, 9) = TextBox69.Text
End Sub