No one will just give you code like that. People here are to help you with your coding problems and not to give you code. But lucky for you, today i'm bored so heres some code.
VB Code:
  1. If InStr(1, UCase(Replace(Text1.Text, " ", "")), "P01.PDF") > 0 Then
  2.         MsgBox "Found"
  3.     Else
  4.         MsgBox "Not Found"
  5.     End If