[table="width: 500"]
[tr]
[td]Function CheckParen(ByVal S As String) As String
Dim X As Long
For X = 1 To Len(S)
If Mid(S, X, 1) Like "[!()]" Then Mid(S, X) = " "
Next
S = Replace(S, " ", "")
Do While Len(S) > 1 And S Like "*()*"
S = Replace(S, "()", "")
Loop
If S Like "*)(*" Then
CheckParen = "Backward"
ElseIf Len(S) Then
CheckParen = "Missing " & Len(S) & " " & Choose(InStr("()", Left(S, 1)), ")", "(")
End If
End Function[/td]
[/tr]
[/table]