Live-Forum - Die aktuellen Beiträge
Datum
Titel
28.03.2024 21:12:36
28.03.2024 18:31:49
Anzeige
Archiv - Navigation
972to976
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
972to976
972to976
Aktuelles Verzeichnis
Verzeichnis Index
Verzeichnis Index
Übersicht Verzeichnisse
USerform ComboBox auslesen
30.04.2008 08:12:30
Christian
Hallo,
ich weiß es gibt tausende von diesen Einträgen, aber leider finde ich immer nur eine Lösung wie ich die vordefenierten Werte auslese.
In der COmboBox im Userform kann es aber auch vorkommen das der gewünschte Inhalt nicht in der ComboBox enthalten ist und man ihn in die ComboBox reinschreibt wie in ein Textfeld.
Jedoch liesst mir dann mein Code den Wert nicht aus.
Kann mir jemand weiterhelfen?
So lese ich im Moment die Werte aus:

For k = 0 To CBox_U_Kunde.ListCount - 1
If CBox_U_Kunde.Selected(i) Then
wskD.Cells(i, 2).Value = CBox_U_Kunde.List(i)
End If
Next k


Gruß und schonmal Danke für eure Bemühungen
Christian

5
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
AW: USerform ComboBox auslesen
30.04.2008 08:36:00
Hajo_Zi
Halo Chritian,
der Code ist zum auslkesen. Ich hätte aus den Neitrag gelesen das es um das schreiben geht, den Code sehe ich aber nicht. Wie werden die vorhandenen Werte der ComboBox zugewiesen?

AW: USerform ComboBox auslesen
30.04.2008 09:03:15
Christian
Hallo Hajo,
ja es geht um das auslesen.
Vielleicht habe ich mich dumm ausgedrückt ich habe zum Bespiel 3 Kunden ( A,B,C) die sind in der ComboBox enthalten. Nun kommt aber ein Kunde D hinzu der noch nicht in der ComboBox enthalten ist. Nun sollen alle Mitarbeiter aber die Möglichkeit habe diesen manuell einfach in die ComboBox reinzuschreiben bis er irgendwann mit in die ComboBox zur Auswahl aufgenommen wird. Diesen manuell eingetragen Wert soll dann in ein Formular übertragen werden. Ich kann ihn aber im Moment den manuell geschrieben WErt in der ComboBox nicht auslesen.
Hoffe es ist jetzt klarer geworden.
Danke
Gruß
Christian

Anzeige
AW: USerform ComboBox auslesen
30.04.2008 09:09:31
dan
Hallo Christian,
versuche es mit der Eigenschafft Value. Die Eigenschafft Style des Combos muss dabei auf 0 stehen (drop down combo). Wenn der Style gleich 1 ist, kann man in den Combo-box nicht schreiben.

Private Sub CommandButton1_Click()
MsgBox Me.ComboBox1.Value
End Sub


Gruss dan, cz.

AW: USerform ComboBox auslesen
30.04.2008 11:13:59
Christian
Mit ComboBox.Value kann ich den Wert nicht in eine Zelle schreiben, da dann der der Laufzeitfehler '424' objekt erforderlich

wskD.Cells(i, 2).Value = UF_Unterkunft.CBox_U_Kunde.Value


Was mache ich falsch?

Anzeige
AW: USerform ComboBox auslesen
30.04.2008 12:56:06
dan
Um ehrlich zu sein, ich weiss es nicht :-). Hier die Beschreibung des Errors. Sonst muesste ich den Code sehen und debugen...
Gruss Dan, cz.
Object required (Error 424)
References to properties and methods often require an explicit object qualifier. This error has the following causes and solutions:
You referred to an object property or method, but didn't provide a valid object qualifier.
Specify an object qualifier if you didn't provide one. For example, although you can omit an object qualifier when referencing a form property from within the form's own module, you must explicitly specify the qualifier when referencing the property from a standard module.
You supplied an object qualifier, but it isn't recognized as an object.
Check the spelling of the object qualifier and make sure the object is visible in the part of the program in which you are referencing it. In the case of Collection objects, check any occurrences of the Add method to be sure the syntax and spelling of all the elements are correct.
You supplied a valid object qualifier, but some other portion of the call contained an error.
An incorrect path as an argument to a host application's File Open command could cause the error. Check arguments.
You didn't use the Set statement in assigning an object reference.
If you assign the return value of a CreateObject call to a Variant variable, an error doesn't necessarily occur if the Set statement is omitted. In the following code example, an implicit instance of Microsoft Excel is created, and its default property (the string "Microsoft Excel") is returned and assigned to the Variant RetVal. A subsequent attempt to use RetVal as an object reference causes this error:
Dim RetVal ' Implicitly a Variant.
' Default property is assigned to Type 8 Variant RetVal.
RetVal = CreateObject("Excel.Application")
RetVal.Visible = True ' Error occurs here.
Use the Set statement when assigning an object reference.
In rare cases, this error occurs when you have a valid object but are attempting to perform an invalid action on the object. For example, you may receive this error if you try to assign a value to a read-only property.
Check the object's documentation and make sure the action you are trying to perform is valid.
For additional information, select the item in question and press F1 (in Windows) or HELP (on the Macintosh).
Anzeige

212 Forumthreads zu ähnlichen Themen

Anzeige
Anzeige
Anzeige

Links zu Excel-Dialogen

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige