Hallo!
Ich programmiere PHP und ein wenig JAVA, aber bei VB stehe ich leider total auf dem Schlauch und hoffe, dass ihr mir weiterhelfen könnt.
Ich möchte in WORD 2007 eine Combobox in VB programmieren, die mit Hilfe einer Klasse bzw. Methode mit bestimmten Parametern erstellt wird.
Folgend mein Ansatz (Microsoft Visual Basic 6.5):
Private Sub Class_Initialize()
Private a As String
Private b As String
Private c As String
Sub FillComboBox(a, b, c)
ComboBox1.AddItem a
ComboBox1.AddItem b
ComboBox1.AddItem c
End Sub
Sub ComboBox1_GotFocus()
FillComboBox("Text1", "Text2", "Text3")
End Sub
Private Sub ComboBox1_Change()
Select Case ComboBox1.Value
Case a
Call M1
Case b
Call M2
Case c
Call M3
End Select
End Sub
End Sub
Ich weiß, dass es so nicht funktionieren kann, finde im Netz aber auch nicht wirklich etwas, dass mir weiterhilft.
Wie wäre der Code korrekt?
Ich danke euch im voraus!
Gruß
tox
|