如果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