title: 800A03EC error while opening excel via vb script
body: <p>I started vb scripting very recently and compiled a vb script (of course googling) to open the excel sheet. However I am getting  800A03EC error - Sorry we could not find the excel sheet. Is it renamed/moved or deleted?</p>
  
  <p><a href="https://i.stack.imgur.com/iBJHQ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iBJHQ.jpg" alt="enter image description here"></a></p>
  
  <p>I can manually open the file manually without any error.</p>
  
  <p>Is this because of document classification?</p>
  
  <p>Here is my code</p>
  
  <pre><code>Option Explicit
  
  Sub FileSplit()
  
  Dim Workbook
  Dim Worksheet
  Dim fileName
  Dim filePath
  Dim objExcel
  Dim objWorkbook
  Dim rowCount
  'Application.ScreenUpdating = False
  'Application.Calculation = xlCalculationManual
  MsgBox ("Hello World")
  filePath = locateFile() 
  
  
  If filePath = "" Then 
     MsgBox "Operation canceled", vbcritical 
  Else 
     wscript.echo filePath
     fileName = Mid(filePath, InStrRev(filePath, "\") + 1)
     wscript.echo fileName
  End If 
  
  Set objExcel = CreateObject("Excel.Application")  
  
  objExcel.Visible = True  
  
  Set objWorkbook = objExcel.Workbooks.Open(fileName) 
  Set objWorkbook = Activeworkbook 
  
  End Sub
  
  
  Function locateFile() 
      locateFile = CreateObject("WScript.Shell").Exec( _ 
      "mshta.exe ""about:&lt;input type=file id=f&gt;" &amp; _ 
      "&lt;script&gt;resizeTo(0,0);f.click();new ActiveXObject  ('Scripting.FileSystemObject')" &amp; _ 
   ".GetStandardStream(1).WriteLine(f.value);close();&lt;/script&gt;""" _ 
        ).StdOut.ReadLine() 
  
  
  End Function
  
  
  call FileSplit
  </code></pre>
  
  <p>many thanks in advance.</p>