Private Function CheckFile Dim oBoolean : oBoolean = True If cFields = "" Then oBoolean = oBoolean And True Else For i = 0 To itemCount - 1 If extenArr(i) <> "" Then If InStr(1, Ucase(cFields), "" & Ucase(Mid(extenArr(i), 2)) & "") > 0 Then oBoolean = oBoolean And True Else sErrors = sErrors & "表单[ " & itemName(i) & " ]的文件格式错误!\n" & _ "支持的格式为:" & Replace(Mid(cFields, 2, Len(cFields) - 1), "", " ") & "\n\n" oBoolean = oBoolean And False End If End If Next End If