Dim nms() As String = {"姓名","身份证号码","单位"}Dim nms2() As String = {"身份证号码","单位","A","B","姓名"}Dim iscontains As Boolean = True
For Each s As String In nms If array.indexof(nms2, s) < 0 Then iscontains = False Exit For End IfNextmsgbox(iscontains)