title: Running Python script from VBA nothing happens, but when I run it from python.exe, it works
body: <p>I'm running Python scrpit from VBA. The result should be a filled cell in Exel file. I tried using this VBA command:</p>
  
  <pre><code>RetVal = Shell("""C:\Python27\python.exe""" &amp; " " &amp; """M:\Analysis\PythonScripts\MySript.py""", vbHide)
  </code></pre>
  
  <p>But nothing happens as the result. However, if I run this scipt from python.exe directly, it works fine. The cell in Excel file is filled with a value. Which brings me to conclusion that something is wrong with VBA code.</p>
  
  <p>Update</p>
  
  <p>Fragment of Python Script:</p>
  
  <pre><code>ExcelApp = win32com.client.GetActiveObject("Excel.Application")
  wb = ExcelApp.Workbooks('File1.xlsm')
  sheet = wb.Worksheets(u'Result')
  cell = sheet.Range('B1')
  cell.Value = result
  </code></pre>