掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
リストボックス内の選択数を制限するには?? (ID:105492)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
EXCEL VBAに無いのはしょうがないので、 リストボックスをなめ回せばよいだけです。 Private Sub CommandButton1_Click() Dim intIndex As Integer Dim intSel As Integer For intIndex = 0 To ListBox1.ListCount - 1 If ListBox1.Selected(intIndex) = True Then intSel = intSel + 1 If intSel > 10 Then ListBox1.Selected(intIndex) = False End If End If Next intIndex End Sub こんな感じで良いですか?
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2020 Takeshi Okamoto All Rights Reserved.