title: VBA code for checking filename with a specifc format
body: <p>I was looking for a vba code that could help me match a filename to a pre-specified format. I want it to color a cell red if it doesnt match the format.
  For Eg: my format is <code>alrt_OBU_PW_YYYYMMDD_HHMMSS.txt</code>
  If the file I browse using <code>application.getopenfilename</code> doesnt match this format, it should give me an error.</p>
  
  <p>Thanks!</p>
  
  <p>Here is what i have done till now-</p>
  
  <p>I have copied the filename into a cell.  </p>
  
  <pre><code>FileName = Sheets("Control Sheet").cells(2, "F").Value   
   If FileName = Format("alrt_OBU_PW_" &amp; Format("yyyymmdd") &amp; "_" &amp; Format("hhmmss") &amp; ".txt") Then  
     wqI.range("G21").Interior.ColorIndex = 43  
     Else: wqI.range("G21").Interior.ColorIndex = 3  
  End If
  </code></pre>