![VBA-进行关键字搜索后列表框显示网格线](https://linux22.com/image/1604061/VBA-%E8%BF%9B%E8%A1%8C%E5%85%B3%E9%94%AE%E5%AD%97%E6%90%9C%E7%B4%A2%E5%90%8E%E5%88%97%E8%A1%A8%E6%A1%86%E6%98%BE%E7%A4%BA%E7%BD%91%E6%A0%BC%E7%BA%BF.png)
我的列表框工作正常,但当我进行单词搜索时(下面的屏幕截图),会出现一些网格线?为什么?我该如何摆脱网格线?有时,即使我清除搜索并重新填充列表框,这些网格线仍会出现。很奇怪!有人遇到过这个问题吗?
Private Sub SetupHoliday_Click()
On Error Resume Next
For i = 0 To AppliedYearListbox.ListCount - 1
If AppliedYearListbox.Selected(i) = True Then
dateButton = "Date_" & Format(AppliedYearListbox.List(i), "yyyy") & "_" & Format(AppliedYearListbox.List(i), "m") & "_" & Format(AppliedYearListbox.List(i), "d")
Set foundCell = rangeSearchDate.Find(what:=dateButton, lookat:=xlWhole, MatchCase:=False, searchformat:=False)
foundRow = foundCell.Row
Sheets("Background").Range("AF" & foundRow).Value = "Holiday"
DoEvents
AppliedYearListbox.Selected(i) = False
End If
Next i
End Sub