Anzeige
Archiv - Navigation
268to272
Aktuelles Verzeichnis
Verzeichnis Index
Übersicht Verzeichnisse
Vorheriger Thread
Rückwärts Blättern
Nächster Thread
Vorwärts blättern
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
268to272
268to272
Aktuelles Verzeichnis
Verzeichnis Index
Verzeichnis Index
Übersicht Verzeichnisse
Inhaltsverzeichnis

textbox und enter

textbox und enter
16.06.2003 12:50:16
IVAN
hi alle
in meinen text boxen(Userform1) möchte ich änderungen vornehmen
nach der änderung möchte ich per ENTER taste die änderung
in meine tabelle eintragen.wenn ich in der textbox eine änderung gemacht habe wird sie akzeptiert sobald ich die 2 textbox anklicke und eingabe drücke erhalte ich die fehler meldung
typen unverträglich???
was mache ich da falsch!!

Private Sub txtNachname_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then Cells(ListBox2.Value, 1) = txtNachname
End Sub
Private Sub txtVorname_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then Cells(ListBox2.Value, 2) = txtVorname
End Sub
Private Sub txtPlz_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then Cells(ListBox2.Value, 3) = txtPlz
End Sub
Private Sub txtOrt_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then Cells(ListBox2.Value, 4) = txtOrt
End Sub
Private Sub txtAdresse_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then Cells(ListBox2.Value, 5) = txtAdresse
End Sub
Private Sub txtTelefon_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then Cells(ListBox2.Value, 6) = txtTelefon
End Sub
Private Sub txtHandy_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then Cells(ListBox2.Value, 7) = txtHandy
End Sub
Private Sub txtFax_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then Cells(ListBox2.Value, 8) = txtFax
End Sub
Private Sub txtEmail_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then Cells(ListBox2.Value, 9) = txtEmail
End Sub
Private Sub txtKennung_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then Cells(ListBox2.Value, 10) = txtKennung
End Sub
Private Sub txtAnmerkung_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then Cells(ListBox2.Value, 11) = txtAnmerkung
End Sub

DANKE
grüße aus wien

11
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
Re: textbox und enter
16.06.2003 13:09:21
Mike E.

Hallo,

vermutlich liegt es daran, dass irgendein Value in listbox2 keine Zahl vom Typen Integer ist.
Überprüfe das doch einmal (steht evl. Text darin?)

Gruß
Mike

Re: textbox und enter
16.06.2003 13:16:58
IVAN

hi
danke erst mal.
leider kann ich dich nicht verstehen was und wo ich überprüfen soll!

Re: textbox und enter
16.06.2003 13:21:26
Mike E.

Hallo,

du wist deinen Code an:

Cells(ListBox2.Value,4)

dabei darf

ListBox2.Value natürlich kein Text sein, da ListBox.Value in deinem Code die ZeilenNUMMER der zu "füllenden" Zelle enthält.

Gruß
Mike

Re: textbox und enter
16.06.2003 13:39:17
IVAN

hi
wie kann ich das überpüfen ob es text ist oder zahl ich sehe immer nur zahlen in der listbox2
danke

Anzeige
Re: textbox und enter
16.06.2003 14:21:53
Michael Scheffler

Hallo,

warum schreibst Du eigentlich keine Klasse für Deine Textboxen - ist viel einfacher.

Gruß

Micha

Re: textbox und enter
16.06.2003 14:35:10
IVAN

ohh hi micha
wo und wie macht man klassen??
hab keinen schimmer!!
DANKE

Re: textbox und enter
16.06.2003 15:10:39
L.Vira

Wo soll in diesem Fall der Vorteil einer Klasse liegen?

Re: textbox und enter
16.06.2003 16:25:27
Michael Scheffler

Hallo,

wo soll bei diesem Code der Vorteil einer Klasse liegen - diese Frage beantwortet sich ja wohl IMHO von selbst.

Aber schön LVira, wenn wir drüber gesprochen haben.

Gruß

Micha

Private Sub txtNachname_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then Cells(ListBox2.Value, 1) = txtNachname
End Sub
Private Sub txtVorname_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then Cells(ListBox2.Value, 2) = txtVorname
End Sub
Private Sub txtPlz_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then Cells(ListBox2.Value, 3) = txtPlz
End Sub
Private Sub txtOrt_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then Cells(ListBox2.Value, 4) = txtOrt
End Sub
Private Sub txtAdresse_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then Cells(ListBox2.Value, 5) = txtAdresse
End Sub
Private Sub txtTelefon_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then Cells(ListBox2.Value, 6) = txtTelefon
End Sub
Private Sub txtHandy_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then Cells(ListBox2.Value, 7) = txtHandy
End Sub
Private Sub txtFax_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then Cells(ListBox2.Value, 8) = txtFax
End Sub
Private Sub txtEmail_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then Cells(ListBox2.Value, 9) = txtEmail
End Sub
Private Sub txtKennung_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then Cells(ListBox2.Value, 10) = txtKennung
End Sub
Private Sub txtAnmerkung_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then Cells(ListBox2.Value, 11) = txtAnmerkung
End Sub


Anzeige
Re: textbox und enter
16.06.2003 16:48:21
L.Vira

Du solltest akzeptieren, dass ich hier nicht plaudern möchte.
Das ist eine ernstgemeinte Frage. Vielleicht überseh ich ja was, aber mir scheint hier eine Klasse keinen Vorteil zu bieten.
Klär mich bitte auf.

Re: an alle bitte um lösung
16.06.2003 17:16:00
IVAN

hi alle und danke erst mal.
ich möchte einmal festhalten das ich hier die frage gestellt habe!
statt zu diskutieren was besser ist, schreibt mir dach mal ein lösungs beispiel bitte!!!!!
danke
ivan

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige