0
我想從Visual Basic中的列表框中讀取所有選定的項目。VB ListBox.Items拋出編譯錯誤
Dim x As Integer
Dim testValue As String
testValue = "20"
For x = 0 To Me.ListBox1.Items.Count() - 1
If Me.ListBox1.Items.Item(x) = testValue Then
MessageBox.Show ("Found it")
Exit Sub
End If
Next x
是我想要的代碼。但是當我運行代碼,我得到「編譯錯誤: 方法或數據成員未找到」
我想我缺少一些引用使用「ListBox.Items」方法的權利? 什麼是必需的參考文獻/圖書館。
謝謝!
嗨,布賴恩,當我運行代碼時,我得到「編譯錯誤:找不到方法或數據成員」。你能分享一下你在項目中使用的參考文獻嗎? – narayanan 2011-04-18 16:19:04