参考代码
Dim filter As String = "1=2"For Each s As String In user.Roles.split(",") filter &= " or 公司名称 = '" & s & "'"Next
msgbox(filter)