title: On Error Resume Next not working in VBScript (VBS) when setting object
body: <p>I just want to test if the object was set. Seems simple enough to me.</p>
  
  <pre><code>Option Explicit
  Dim objExcel, wMn
  Set objExcel = CreateObject("Excel.Application")
  msgbox "test"
  On Error Resume Next
  Set wMn = objExcel.Workbooks.Open("Z:\path\file_*.xlsm")
  
  msgbox "test1"
  If Err.Number = 0  then
    msgbox "test2"
  end if
  On Error Goto 0
  </code></pre>
  
  <p>The msgbox "test" shows, but the msgbox "test1" and msgbox "test2" never show. I just hangs on the Set if the file is not there. VBS only please. Thanks.</p>
  
  <p>I know I can use a file system object, but I am wondering why I can't do something like this. </p>