title: Unknown Runtime Error VBScript Excel
body: <p>I am trying to oepn an excel file, write a variable from a user input into cell D4, then read cell E4.  I keep getting ann <code>Unknown Runtime Error</code></p>
  
  <pre><code>Sub ReportTP()
  
  Dim objExcel, wb, ws
  
  TPdate = document.getElementById("TPreportDate").value
  
  Set objExcel = CreateObject("Excel.Application")
  objExcel.Application.Visible = True
  
  Set objWorkbook = objExcel.Workbooks.Open("path to file")
  objExcel.ActiveSheet.Unprotect "SFGA"
  
  Set objWorksheet = objWorkbook.Worksheets(1)
  
  objExcel.Cells(D4).value = TPDate
  
  reportVarTP = objExcel.Cells(E4).value
  
  msgbox reportVarTP
  objExcel.ActiveSheet.Protect
  objExcel.ActiveWorkbook.Save 
  objExcel.ActiveWorkbook.Close
  
  objExcel.Application.Quit
  
  End Sub
  </code></pre>