Function MaskCompare(txt As String, mask As String, CaseSensitive As Boolean)
If Not CaseSensitive Then
txt = UCase(txt)
mask = UCase(mask)
End If
If txt Like mask Then
MaskCompare = True
Else
MaskCompare = False
End If
End Function