如果ListBoxProjects中有多個選擇,我想以下代碼會打開MsgBox警告。如果列表框中有多個選擇,MsgBox會打開
但是,如果只有一個選擇,它也會打開MsgBox。如果沒有選擇,它不會打開MsgBox。位卡在這一個,任何幫助感激地收到。
If Me.ListBoxProjects.ListIndex > 1 Then
MsgBox "You can only edit Projects 1 at a time", vbExclamation, "Project Editing"
End If
谷歌是什麼'ListBox.ListIndex'屬性,而你正在做的,找出其他屬性都與ListBox控件 – jsotola