Live-Forum - Die aktuellen Beiträge
Datum
Titel
28.03.2024 21:12:36
28.03.2024 18:31:49
Anzeige
Archiv - Navigation
820to824
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
820to824
820to824
Aktuelles Verzeichnis
Verzeichnis Index
Verzeichnis Index
Übersicht Verzeichnisse
Inhaltsverzeichnis

AW: Speichern der Eingabemaske

AW: Speichern der Eingabemaske
26.11.2006 14:51:17
Achille
Hallo Excel Profis,
bitte helft, ich komme nicht weiter.
In eine Eingabemaske sind unter anderem ein Button zum übernehmen der getätigten Eingaben in die Tabelle.
Der andere Button zum Abspeichern der gesamten Tabelle.
Beim betätigen des Speicherbuttons bekomme ich allerdings ein Debbug weiß aber nicht warum
Könnte mir einer bitte die nachstehenden Werte korrigieren, ich währe euch sehr dankbar.
Gruß
Achi

Private Sub CommandButton2_Click()
Dim xZeile As Long
If TextBox1 = "" Then Exit Sub
If ComboBox1.ListIndex = 0 Then
xZeile = [A65536].End(xlUp).Row + 1
Else
xZeile = ComboBox1.ListIndex + 1
End If
End Sub


Private Sub CommandButton4_Click()
Dim xZeile As Long
If TextBox1 = "" Then
ActiveWorkbook.Save
Exit Sub
End If
End Sub

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

Betreff
Datum
Anwender
Anzeige
AW: AW: Speichern der Eingabemaske
26.11.2006 14:57:07
Herbert
Hi,
mak abgesehen davon, dass das so auch reichen würde, kann es an diesem Code nicht liegen.

Private Sub CommandButton4_Click()
If TextBox1 = "" Then ActiveWorkbook.Save
End Sub

mfg Herbert
AW: AW: Speichern der Eingabemaske
26.11.2006 17:06:56
Achille
Es funktionier einfach nicht, ich kriege weiterhin ein Debbug.
hier nochmal die fesamte Formel.
Option Explicit

Private Sub ComboBox1_Click()
If ComboBox1.ListIndex <> 0 Then
TextBox1 = Cells(ComboBox1.ListIndex + 1, 1)
Else
TextBox1 = ""
End If
End Sub


Private Sub CommandButton1_Click()
If ComboBox1.ListIndex > 0 Then
Rows(ComboBox1.ListIndex + 1).Delete
TextBox1 = ""
UserForm_Initialize
End If
End Sub


Private Sub CommandButton2_Click()
Dim xZeile As Long
If TextBox1 = "" Then Exit Sub
If ComboBox1.ListIndex = 0 Then
xZeile = [A65536].End(xlUp).Row + 1
Else
xZeile = ComboBox1.ListIndex + 1
End If

Private Sub CommandButton4_Click()
If TextBox1 = "" Then ActiveWorkbook.Save
End Sub

TextBox1 = ""
Cells(xZeile, 2).Value = TextBox2.Value
Cells(xZeile, 3).Value = TextBox3.Value
Cells(xZeile, 4).Value = TextBox4.Value
Cells(xZeile, 5).Value = TextBox5.Value
Cells(xZeile, 6).Value = TextBox6.Value
Cells(xZeile, 7).Value = TextBox7.Value
Cells(xZeile, 8).Value = TextBox8.Value
Cells(xZeile, 9).Value = TextBox9.Value
Cells(xZeile, 10).Value = TextBox10.Value
Cells(xZeile, 11).Value = TextBox11.Value
Cells(xZeile, 12).Value = TextBox12.Value
Cells(xZeile, 13).Value = TextBox13.Value
TextBox1 = ""
TextBox2 = ""
TextBox3 = ""
TextBox4 = ""
TextBox5 = ""
TextBox6 = ""
TextBox6 = ""
TextBox8 = ""
TextBox9 = ""
TextBox10 = ""
TextBox11 = ""
TextBox12 = ""
TextBox13 = ""
End Sub


Private Sub CommandButton3_Click()
Unload Me
End Sub


Private Sub TextBox121_Change()
End Sub


Private Sub TextBox11_Change()
End Sub


Private Sub TextBox3_Change()
End Sub


Private Sub TextBox6_Change()
End Sub


Private Sub UserForm_Initialize()
Dim aRow, i As Long
Application.EnableEvents = False
ComboBox1.Clear
aRow = [A65536].End(xlUp).Row
ComboBox1.AddItem "neue Person hinzufügen"
For i = 2 To aRow
ComboBox1.AddItem Cells(i, 1) & ", " & Cells(i, 2)
Next i
ComboBox1.ListIndex = 0
Application.EnableEvents = True
End Sub

Anzeige
AW: AW: Speichern der Eingabemaske
26.11.2006 17:10:22
Herbert

Private Sub CommandButton4_Click()
If TextBox1 = "" Then ActiveWorkbook.Save
End Sub

Darf nicht in einer anderen Sub stehen.
mfg Herbert
AW: AW: Speichern der Eingabemaske
26.11.2006 17:32:56
Achille
Leider habe ich keine Ahnung und kann dir nicht folgen, was meinst du mit "Darf nicht in einer anderen Sub stehen". Köntest du mir bitte "CommandButton1 + CommandButton2" so
umändern das keine Konflickte entstehen, wäre wirklich sehr nett.
Danke im voraus
Gruß
Achi
AW: AW: Speichern der Eingabemaske
26.11.2006 17:47:05
Herbert
Hi,
bin leider kein Hellseher, lad deine Mappe mal hoch.
mfg Herbert
AW: AW: Speichern der Eingabemaske
26.11.2006 18:17:09
Herbert
Option Explicit

Private Sub ComboBox1_Click()
If ComboBox1.ListIndex <> 0 Then
TextBox1 = Cells(ComboBox1.ListIndex + 1, 1)
Else
TextBox1 = ""
End If
End Sub


Private Sub CommandButton1_Click()
If ComboBox1.ListIndex > 0 Then
Rows(ComboBox1.ListIndex + 1).Delete
TextBox1 = ""
UserForm_Initialize
End If
End Sub


Private Sub CommandButton2_Click()
Dim xZeile As Long
If TextBox1 = "" Then Exit Sub
If ComboBox1.ListIndex = 0 Then
xZeile = [A65536].End(xlUp).Row + 1
Else
xZeile = ComboBox1.ListIndex + 1
End If
TextBox1 = ""
Cells(xZeile, 2).Value = TextBox2.Value
Cells(xZeile, 3).Value = TextBox3.Value
Cells(xZeile, 4).Value = TextBox4.Value
Cells(xZeile, 5).Value = TextBox5.Value
Cells(xZeile, 6).Value = TextBox6.Value
Cells(xZeile, 7).Value = TextBox7.Value
Cells(xZeile, 8).Value = TextBox8.Value
Cells(xZeile, 9).Value = TextBox9.Value
Cells(xZeile, 10).Value = TextBox10.Value
Cells(xZeile, 11).Value = TextBox11.Value
Cells(xZeile, 12).Value = TextBox12.Value
Cells(xZeile, 13).Value = TextBox13.Value
TextBox1 = ""
TextBox2 = ""
TextBox3 = ""
TextBox4 = ""
TextBox5 = ""
TextBox6 = ""
TextBox6 = ""
TextBox8 = ""
TextBox9 = ""
TextBox10 = ""
TextBox11 = ""
TextBox12 = ""
TextBox13 = ""
End Sub


Private Sub CommandButton3_Click()
Unload Me
End Sub


Private Sub CommandButton4_Click()
If TextBox1 = "" Then ThisWorkbook.Save
End Sub


Private Sub UserForm_Initialize()
Dim aRow, i As Long
Application.EnableEvents = False
ComboBox1.Clear
aRow = [A65536].End(xlUp).Row
ComboBox1.AddItem "neue Person hinzufügen"
For i = 2 To aRow
ComboBox1.AddItem Cells(i, 1) & ", " & Cells(i, 2)
Next i
ComboBox1.ListIndex = 0
Application.EnableEvents = True
End Sub

mfg Herbert
Anzeige
AW: AW: Speichern der Eingabemaske
26.11.2006 18:28:15
Achille
UNGLAUBLICH!!
Herbert.
Ich bin fasziniert.
funktioniert fantastisch.
Ich danke die nochmals herzlich
Schönen Gruß
Achille

Links zu Excel-Dialogen

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige