【发布时间】:2014-04-18 15:21:36
【问题描述】:
我有一个列表框控件,它假设将所选项目的列表填充到 MsgBox 中,但是当我运行它时,我不断收到错误代码。
错误:编译错误:找不到方法或数据成员
我做错了什么?
Private Sub ctrSend_Click()
Dim msg As String
Dim i As Integer
Dim lstMsg As ListBox
If lstShipping.ListIndex = -1 Then
msg = "Nothing"
Else
msg = ""
For i = 0 To lstShipping.ListCount - 1
If lstShipping.Selected(i) Then _
msg = msg & lstMsg.List(i) & vbCrLf
Next i
End If
MsgBox "You selected: " & vbCrLf & msg, vbOKOnly, "Selected BIN"
Unload Me
End Sub
【问题讨论】:
标签: ms-access compiler-errors listbox vba listboxitem