我不确定为什么会这样,但是在 Click 事件中,我需要获取列表框中的选定项,但是当循环初始化时,没有可用的选定项。
Private Sub lstUPSCs_Click()
On Error GoTo Err_lstAttribute_Change
Dim strSelect As String
Dim sQuery As String
Dim sUPSC As String
Dim itm As Variant
For Each itm In Me.lstUPSCs.ItemsSelected
strSelect = strSelect & "," & LTrim(RTrim(Mid(lstUPSCs.Column(0, itm), 1, 8)))
Next
END SUB
请帮忙解决这个问题?