- Private Sub Command1_Click()
- List1.AddItem Text1.Text
- End Sub
-
- Private Sub Command2_Click()
- List1.Clear
- End Sub
-
- Private Sub List1_DblClick()
- If List1.ListIndex <> -1 Then
- MsgBox List1.List(List1.ListIndex)
- End If
- End Sub
-
- Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
- If KeyCode = vbKeyReturn Then
- List1.AddItem Text1.Text
- Text1.SelStart = 0
- Text1.SelLength = Len(Text1.Text)
- End If
- End Sub
Private Sub Command1_Click()
List1.AddItem Text1.Text
End Sub
Private Sub Command2_Click()
List1.Clear
End Sub
Private Sub List1_DblClick()
If List1.ListIndex <> -1 Then
MsgBox List1.List(List1.ListIndex)
End If
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
List1.AddItem Text1.Text
Text1.SelStart = 0
Text1.SelLength = Len(Text1.Text)
End If
End Sub