ich versuche seit Tagen ein Problem zu lösen das ich bis jetzt noch nicht geschafft habe, ich hoffe ihr könnt mir weiter helfen.
Also das Problem ist folgendes, ich hab eine Userform erstellt mit ca 10 Textboxen, nun will ich diese Werte von den Textboxen in eine Tabelle mit deinem Button speichern, dies soll dazu dienen das ich beim nächsten aufruf der Userform die werte automatisch reinschreibe. Hier das was ich bis jetzt gemacht habe.
Private Sub CommandButton5_Click() Range("dd" & 10).Select ActiveCell.Value = TextBox10.Value Range("dd" & 11).Select ActiveCell.Value = TextBox11.Value Range("dd" & 12).Select ActiveCell.Value = TextBox12.Value Range("dd" & 13).Select ActiveCell.Value = TextBox13.Value Range("dd" & 14).Select ActiveCell.Value = TextBox14.Value Range("dd" & 15).Select ActiveCell.Value = TextBox15.Value Range("dd" & 16).Select ActiveCell.Value = TextBox16.Value Range("dd" & 17).Select ActiveCell.Value = TextBox17.Value Range("dd" & 18).Select ActiveCell.Value = TextBox18.Value Range("dd" & 19).Select ActiveCell.Value = TextBox19.Value Range("dd" & 20).Select ActiveCell.Value = TextBox20.Value Range("dd" & 21).Select ActiveCell.Value = TextBox21.Value End Sub
Schön und gut das Funktioniert so aber das ist nur eine Notlösung in meinen augen, ich möchte den Langen Quelltext nur mit einer schleife lösen wie z.B. mit
For TB = 1 To 10
Range("CD" & TB).Select
ActiveCell.Value = Me.OLEObjects("Textbox" & TB).Object.Value
Next TB
Nur meldet er bei mir "Fehler beim Kompelieren Methode oder Datenobjekt nicht gefunden"
Danke im voraus für eure Antworten
MfG
Asterix