title image


Smiley Re: Listbox
versuche bitte folgendes beispiel

ich habe hier drei list-felder, drei Label und sechs commandbuttons in eine form gezeichnet. einfach nur hineinzeichnen - wird bei form_load formatiert

bei mir hat alles einwandfrei funktioniert

ich hoffe es läuft auch bei dir nach wunsch

*************************************************************

klaus



Option Explicit

Private Sub Command1_Click()

List2.AddItem List1.Text

List1.RemoveItem List1.ListIndex

Command1.Enabled = False

Command2.Enabled = False

End Sub



Private Sub Command2_Click()

List3.AddItem List1.Text

List1.RemoveItem List1.ListIndex

Command1.Enabled = False

Command2.Enabled = False

End Sub



Private Sub Command3_Click()

List1.AddItem List2.Text

List2.RemoveItem List2.ListIndex

Command3.Enabled = False

Command4.Enabled = False

End Sub



Private Sub Command4_Click()

List3.AddItem List2.Text

List2.RemoveItem List2.ListIndex

Command3.Enabled = False

Command4.Enabled = False

End Sub



Private Sub Command5_Click()

List1.AddItem List3.Text

List3.RemoveItem List3.ListIndex

Command5.Enabled = False

Command6.Enabled = False

End Sub



Private Sub Command6_Click()

List2.AddItem List3.Text

List3.RemoveItem List3.ListIndex

Command5.Enabled = False

Command6.Enabled = False

End Sub



Private Sub Form_Load()

With Me

.Height = 3390

.Width = 6000

End With

With Label1

.Left = 240

.Top = 240

.Height = 255

.Width = 1695

.Caption = "Länder"

End With

With Label2

.Left = 2160

.Top = 240

.Height = 255

.Width = 1695

.Caption = "Vornamen-weiblich"

End With

With Label3

.Left = 4080

.Top = 240

.Height = 255

.Width = 1695

.Caption = "Vornamen-männlich"

End With

With List1

.Left = Label1.Left

.Width = Label1.Width

.Height = 1035

.Top = 600

.AddItem "Anton"

.AddItem "Birgit"

.AddItem "Franziska"

.AddItem "Josef"

.AddItem "China"

End With

With List2

.Left = Label2.Left

.Width = Label2.Width

.Height = 1035

.Top = 600

.AddItem "Margit"

.AddItem "Österreich"

.AddItem "Deutschland"

.AddItem "Gerhard"

End With

With List3

.Left = Label3.Left

.Width = Label3.Width

.Height = 1035

.Top = 600

.AddItem "Klaus"

.AddItem "Italien"

.AddItem "Norwegen"

.AddItem "Herta"

End With

With Command1

.Left = Label1.Left

.Width = Label1.Width

.Height = 375

.Top = 1920

.Caption = "nach VN-weiblich"

.Enabled = False

End With

With Command2

.Left = Label1.Left

.Width = Label1.Width

.Height = 375

.Top = 2400

.Caption = "nach VN-männlich"

.Enabled = False

End With

With Command3

.Left = Label2.Left

.Width = Label2.Width

.Height = 375

.Top = 1920

.Caption = "nach Länder"

.Enabled = False

End With

With Command4

.Left = Label2.Left

.Width = Label2.Width

.Height = 375

.Top = 2400

.Caption = "nach VN-männlich"

.Enabled = False

End With

With Command5

.Left = Label3.Left

.Width = Label3.Width

.Height = 375

.Top = 1920

.Caption = "nach Länder"

.Enabled = False

End With

With Command6

.Left = Label3.Left

.Width = Label3.Width

.Height = 375

.Top = 2400

.Caption = "nach VN-weiblich"

.Enabled = False

End With

End Sub



Private Sub List1_Click()

Command1.Enabled = True

Command2.Enabled = True

Command3.Enabled = False

Command4.Enabled = False

Command5.Enabled = False

Command6.Enabled = False

End Sub



Private Sub List2_Click()

Command3.Enabled = True

Command4.Enabled = True

Command1.Enabled = False

Command2.Enabled = False

Command5.Enabled = False

Command6.Enabled = False

End Sub



Private Sub List3_Click()

Command5.Enabled = True

Command6.Enabled = True

Command3.Enabled = False

Command4.Enabled = False

Command1.Enabled = False

Command2.Enabled = False

End Sub



geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: