Private Sub CommandButton1_Click() With ListBox1 If .ListIndex = -1 Then MsgBox "未選択です。" Else MsgBox .List(.ListIndex, 0) End If End With End Sub
Private Sub CommandButton1_Click() With ListBox1 If .ListIndex = -1 Then MsgBox "未選択です。" Else MsgBox .List(.ListIndex, 0) End If End With End Sub