Live-Forum - Die aktuellen Beiträge
Datum
Titel
28.03.2024 21:12:36
28.03.2024 18:31:49
Anzeige
Archiv - Navigation
1660to1664
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
Inhaltsverzeichnis

kopieren in bestimmtes Tebellenblatt

kopieren in bestimmtes Tebellenblatt
10.12.2018 10:42:26
Chris
Hallo zusammen,
ich möchte mir ein Verbandsbuch erstellen. Ich habe soweit alles fertig.
Ich habe 2 Tabellen. Erste Hilfe und Registrierung. Auf dem Erste Hilfe blatt soll nur der Button zum Aktivieren
Sub Grafik2_Klicken()
UserForm1.Show
End Sub
funktioniert auch danach kommen die Felder die ich ausfülle geht auch.
Nur wenn ich auf Fertig klicke kopiert er alles immer nur in die aktive Tabelle... es soll aber in die Registrierung immer rein! könnt ihr mir helfen?
Private Sub CommandButton1_Click()
'Überprüfung Name des Verletzen'
If TextBox1.Value = "" Then
MsgBox "Name des Verletzten?."
End If
'Überprüfung Name des Zeugen'
If TextBox4.Value = "" Then
MsgBox "Name des Zeugen?."
End If
'Überprüfung Ersthelfer'
If TextBox5.Value = "" Then
MsgBox "Name des Ersthelfers?."
End If
'Überprüfung Material'
If TextBox6.Value = "" Then
MsgBox "Welches Material entnommen?."
End If
'Überprüfung Unfallhergang'
If TextBox2.Value = "" Then
MsgBox "Unfallhergang?."
End If
'Überprüfung Art der Verletzung'
If TextBox3.Value = "" Then
MsgBox "Art der Verletzung?."
End If
'Überprüfung ob TextBox leer'
Select Case TextBox1
Case Is = ""
End Select
Select Case TextBox2
Case Is = ""
End Select
Select Case TextBox3
Case Is = ""
End Select
Select Case TextBox4
Case Is = ""
End Select
Select Case TextBox5
Case Is = ""
End Select
Select Case TextBox6
Case Is = ""
End Select
Call Registrierung
Ende:
TextBox1.Value = ""
TextBox2.Value = ""
TextBox3.Value = ""
TextBox4.Value = ""
TextBox5.Value = ""
TextBox6.Value = ""
End Sub

Sub Registrierung()
Dim LoLetzte As Long
If Range("B2") = "" Then
LoLetzte = 2
Else
LoLetzte = IIf(IsEmpty(Cells(Rows.Count, 3)), Cells(Rows.Count, 3).End(xlUp).Row, Rows. _
Count) + 1
End If
Cells(LoLetzte, 3) = TextBox1
If Cells(LoLetzte, 3) = "" Then
Else
Cells(LoLetzte, 1) = Date
Cells(LoLetzte, 2) = Time
Cells(LoLetzte, 4) = TextBox4
Cells(LoLetzte, 5) = TextBox5
Cells(LoLetzte, 6) = TextBox6
Cells(LoLetzte, 7) = TextBox2
Cells(LoLetzte, 8) = TextBox3
LoLetzte = LoLetzte + 1
End If
End Sub
Private Sub CommandButton2_Click()
Unload Me
End Sub
Private Sub Image1_BeforeDragOver(ByVal Cancel As MSForms.ReturnBoolean, ByVal Data As MSForms.  _
_
DataObject, ByVal X As Single, ByVal Y As Single, ByVal DragState As MSForms.fmDragState, ByVal  _
Effect As MSForms.ReturnEffect, ByVal Shift As Integer)
End Sub

1
Beitrag zum Forumthread
Beitrag zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
AW: kopieren in bestimmtes Tebellenblatt
10.12.2018 11:03:23
Werner
Hallo Chris,
so:
Sub Registrierung()
Dim LoLetzte As Long
With Worksheets("Registrierung")
If .Range("B2") = "" Then
LoLetzte = 2
Else
LoLetzte = .Cells(.Rows.Count, 3).End(xlUp).Offset(1).Row
End If
.Cells(LoLetzte, 3) = TextBox1
.Cells(LoLetzte, 1) = Date
.Cells(LoLetzte, 2) = Time
.Cells(LoLetzte, 4) = TextBox4
.Cells(LoLetzte, 5) = TextBox5
.Cells(LoLetzte, 6) = TextBox6
.Cells(LoLetzte, 7) = TextBox2
.Cells(LoLetzte, 8) = TextBox3
End With
End If
Gruß Werner
Anzeige

Links zu Excel-Dialogen

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige