Live-Forum - Die aktuellen Beiträge
Anzeige
Archiv - Navigation
1104to1108
Aktuelles Verzeichnis
Verzeichnis Index
Übersicht Verzeichnisse
Vorheriger Thread
Rückwärts Blättern
Nächster Thread
Vorwärts blättern
Anzeige
HERBERS
Excel-Forum
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
Inhaltsverzeichnis

UserForm TextBox

UserForm TextBox
rolf
hallo
mit diesem makro möchte ich über textboxen in einer userform einträge in einer tabelle bearbeiten.
sie sollen also in die selbe zelle zurückgeschrieben werden.dies gelingt mir aber nur in den Spalten 1 u.4,
in den anderen spalten funktioniert es leider nicht.
frage:was muss ich ändern ?
'EINTRAG BEARBEITEN
Private Sub CommandButton2_Click()
Dim wohin As Integer
wohin = Sheets("Tabelle1").Range("D7000").End(xlUp).Offset(1, 0).Row
wohin = Me.ComboBox1.ListIndex + 1
'In Blatt "Tabelle1"
On Error Resume Next
Sheets("Tabelle1").Cells(wohin, 1) = Format(TextBox2.Text)
Sheets("Tabelle1").Cells(wohin, 4) = Format(TextBox3.Text)
Sheets("Tabelle1").Cells(wohin, 2) = Format(TextBox4.Text)
Sheets("Tabelle1").Cells(wohin, 3) = Format(TextBox5.Text)
Sheets("Tabelle1").Cells(wohin, 6) = Format(TextBox6.Text)
Sheets("Tabelle1").Cells(wohin, 8) = Format(TextBox7.Text)
Sheets("Tabelle1").Cells(wohin, 9) = Format(TextBox8.Text)
Sheets("Tabelle1").Cells(wohin, 14) = Format(TextBox9.Text)
Sheets("Tabelle1").Cells(wohin, 12) = Format(TextBox10.Text)
Sheets("Tabelle1").Cells(wohin, 10) = Format(TextBox11.Text)
Sheets("Tabelle1").Cells(wohin, 16) = Format(TextBox12.Text)
Sheets("Tabelle1").Cells(wohin, 21) = Format(TextBox13.Text)
Sheets("Tabelle1").Cells(wohin, 19) = Format(TextBox14.Text)
Sheets("Tabelle1").Cells(wohin, 17) = Format(TextBox15.Text)
Sheets("Tabelle1").Cells(wohin, 32) = Format(TextBox16.Text)
Sheets("Tabelle1").Cells(wohin, 33) = Format(TextBox17.Text)
Sheets("Tabelle1").Cells(wohin, 36) = Format(TextBox18.Text)
Sheets("Tabelle1").Cells(wohin, 43) = Format(TextBox19.Text)
Sheets("Tabelle1").Cells(wohin, 39) = Format(TextBox20.Text)
Sheets("Tabelle1").Cells(wohin, 38) = Format(TextBox21.Text)
Sheets("Tabelle1").Cells(wohin, 35) = Format(TextBox22.Text)
Sheets("Tabelle1").Cells(wohin, 46) = Format(TextBox23.Text)
Sheets("Tabelle1").Cells(wohin, 41) = Format(TextBox24.Text)
Sheets("Tabelle1").Cells(wohin, 56) = Format(TextBox25.Text)
Sheets("Tabelle1").Cells(wohin, 59) = Format(TextBox26.Text)
Sheets("Tabelle1").Cells(wohin, 62) = Format(TextBox27.Text)
Sheets("Tabelle1").Cells(wohin, 91) = Format(TextBox28.Text)
Sheets("Tabelle1").Cells(wohin, 77) = Format(TextBox29.Text)
'Unload Me
End Sub
mfg rolf

8
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Benutzer
Anzeige
AW: UserForm TextBox
28.09.2009 14:26:55
Rudi
Hallo,
wohin = Sheets("Tabelle1").Range("D7000").End(xlUp).Offset(1, 0).Row
wohin = Me.ComboBox1.ListIndex + 1

was denn nun?
2. kommentiere mal On Error aus. Dann merkst du, wo es knirschst.
Gruß
Rudi
AW: UserForm TextBox
28.09.2009 15:01:54
rolf
hallo Rudi
habe leider nicht so viel ahnung und verstehe nicht was du meinst.
mfg rolf
AW: UserForm TextBox
28.09.2009 15:12:30
Rudi
Hallo,
du verpasst der Variablen 2x einen Wert. Was soll es denn sein? Die erste Zuweisung ist mit der 2. hinfällig und kann somit entfallen.
On Error Resume Next sollte man während der Entwicklung nie benutzen, da man dann nicht merkt, wo Fehler auftreten.
Für weitere Analysen die Mappe hochladen.
Gruß
Rudi
Anzeige
AW: UserForm TextBox
28.09.2009 16:10:15
rolf
hallo
hier meine mappe.einen neuen kontakt erstelle funktioniert.
leider nicht das bearbeiten.

Die Datei https://www.herber.de/bbs/user/64763.xls wurde aus Datenschutzgründen gelöscht


mf grolf
AW: UserForm TextBox
28.09.2009 18:16:34
robert
hi,
sorry, nicht korrekt
stelle wieder auf offen
gruß
robert
FUNKTIONIERT
28.09.2009 19:31:03
rolf
Hallo
vielen dank funktioniert prima !
mfg rolf

Links zu Excel-Dialogen

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige