title: Calling VBA macro from .vbs file throws 800A03EC error
body: <p>I'm trying to run a VBA macro through .VBS file(File name: Check_final.vbs). Here is the code</p>
  
  <pre class="lang-vb prettyprint-override"><code>Option Explicit
  
  run_macro
  
  Sub run_macro()
      Dim xl1
      Dim sCurPath
      Dim xlBook
      Dim FolderFromPath
      Set xl1 = CreateObject("Excel.application")
  
      sCurPath =Wscript.ScriptFullName                                                                            
      Set xlBook = xl1.Workbooks.Open(sCurPath, 0, True)
      xl1.DisplayAlerts = False
      FolderFromPath = Left(sCurPath, InStrRev(sCurPath, "\"))
      xl1.Application.run FolderFromPath &amp; "Changed_chk.xlsm!Check"
  
      Set xlBook = Nothing
  End Sub
  </code></pre>
  
  <p>When I run this .vbs file I get this popup 'Changed_chk.xlsm is locked for editing' with Read only and notify options. If I acknowledge it with either Read only or notify option a excel sheet is opened in the name of Check_final (which is the file name of that .vbs file) and the above mentioned code is shown written in that excel file. Then I get a Windows script host error(code: 800A03AC) saying macro may not be available or all macro's are disabled.(Though I have enabled the macro as mentioned here.[<a href="http://www.addictivetips.com/windows-tips/enable-all-macros-in-excel-2010/%29%5d" rel="nofollow">http://www.addictivetips.com/windows-tips/enable-all-macros-in-excel-2010/)]</a>.
  Any help on this is much appreciated. Thanks in advance.</p>