Live-Forum - Die aktuellen Beiträge
Anzeige
Archiv - Navigation
416to420
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
416to420
416to420
Aktuelles Verzeichnis
Verzeichnis Index
Verzeichnis Index
Übersicht Verzeichnisse
Inhaltsverzeichnis

Userform und ComboBox...

Userform und ComboBox...
Ina
Hallo Forum,
ich habe ein, für mich einfach unlösbares, Problem...
In meiner Userform1 habe ich 19 Textboxen und 3 ComboBoxen.
Die Reihenfolge:
Textbox1 - TextBox11 / ComboBox1 / TextBox12 - TextBox14 / ComboBox2 / TextBox15 / ComboBox3 / TextBox16 - TextBox19.
Das Problem:
Der Inhalt der TextBoxen und ComboBoxen sollen in der aufgeführten Reihenfolge in die Tabelle3 in eine Zeile (ab B2) geschrieben werden.
Leider klappt das nur mit den TextBoxen (werden in der Reihenfolge in die Tabelle geschrieben).
Wie kann ich den Inhalt der ComboBoxen in die Tabelle übernehmen?
Schaut euch doch bitte einmal folgenden Code an und fangt an zu stricken...

Private Sub CommandButton1_Click()
Dim intIndex As Integer, bolausgefüllt As Boolean, lngleereZeile As Long
For intIndex = 1 To 11
If Controls("TextBox" & CStr(intIndex)) = "" Then
MsgBox "Da fehlt noch was...   ", 48, "Hinweis :-)"
Controls("TextBox" & CStr(intIndex)).SetFocus
Exit Sub
End If
Next
For intIndex = 1 To 1
If Controls("ComboBox" & CStr(intIndex)) = True Then bolausgefüllt = True: Exit For
Next
If Not bolausgefüllt Then
MsgBox "Angabe fehlt...   ", 48, "Hinweis :-)"
Exit Sub
End If
For intIndex = 12 To 14
If Controls("TextBox" & CStr(intIndex)) = "" Then
MsgBox "Da fehlt noch was...   ", 48, "Hinweis :-)"
Controls("TextBox" & CStr(intIndex)).SetFocus
Exit Sub
End If
Next
For intIndex = 1 To 1
If Controls("ComboBox" & CStr(intIndex)) = True Then bolausgefüllt = True: Exit For
Next
If Not bolausgefüllt Then
MsgBox "Angabe fehlt...   ", 48, "Hinweis :-)"
Exit Sub
End If
For intIndex = 15 To 15
If Controls("TextBox" & CStr(intIndex)) = "" Then
MsgBox "Da fehlt noch was...   ", 48, "Hinweis :-)"
Controls("TextBox" & CStr(intIndex)).SetFocus
Exit Sub
End If
Next
For intIndex = 1 To 1
If Controls("ComboBox" & CStr(intIndex)) = True Then bolausgefüllt = True: Exit For
Next
If Not bolausgefüllt Then
MsgBox "Angabe fehlt...   ", 48, "Hinweis :-)"
Exit Sub
End If
For intIndex = 16 To 19
If Controls("TextBox" & CStr(intIndex)) = "" Then
MsgBox "Da fehlt noch was...   ", 48, "Hinweis :-)"
Controls("TextBox" & CStr(intIndex)).SetFocus
Exit Sub
End If
Next
With Worksheets("Tabelle3")
lngleereZeile = .Cells(65536, 2).End(xlUp).Row + 1
If lngleereZeile < 2 Then lngleereZeile = 2
For intIndex = 1 To 19
.Cells(lngleereZeile, intIndex + 1) = Controls("TextBox" & CStr(intIndex))
Controls("TextBox" & CStr(intIndex)) = ""
Next
End With
TextBox1.SetFocus
If lngleereZeile = 107 Then
MsgBox "Tabelle voll...   ", 48, "Hinweis :-)"
Unload Me
End If
End Sub

Vielen Dank im Voraus!!!
Grüsse,
Ina

6
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Benutzer
Anzeige
AW: Userform und ComboBox...
K.Rola
Hallo,
wenns nicht geheim ist, lad die Mappe mal hoch, ggf. zippen.
Gruß K.Rola
AW: Userform und ComboBox... (K.Rola)
K.Rola
Hallo,
kann dir leider nicht helfen.
Gruß K.Rola
AW: Userform und ComboBox... (K.Rola)
23.04.2004 16:18:54
Ina
Hallo K.Rola,
schade... Aber trotzdem Danke für Deine Bemühungen!
Ein schönes Wochenende!
Viele Grüsse,
Ina
AW: Userform und ComboBox...
André
Hallo Ina,
ich habe einen "Eintragen" Button
hinzugefügt.
Ich hoffe ich konnte Dir helfen?!
https://www.herber.de/bbs/user/5626.xls
Gruß und schönes Wochenende
AndréL.
Anzeige
AW: Userform und ComboBox...
23.04.2004 16:17:03
Ina
Hallo AndréL,
auch das ist eine Lösung! Danke schön!
Auch Dir ein schönes Wochenende!
Viele Grüsse,
Ina

Links zu Excel-Dialogen

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige