title: Open an Excel file saved with password for modify
body: <p>I would like to open an excel file that is saved with a password for modify with VBScript. My current code VBS code is below, which works, but it keeps popping up with boax asking for a password. How can i open the excel spreadsheet with excel prompting me for a password?</p>
  
  <pre><code>Option Explicit
  
  On Error Resume Next
  
  ExcelMacroExample
  
  Sub ExcelMacroExample() 
  
    Dim xlApp 
    Dim xlBook 
  
    Set xlApp = CreateObject("Excel.Application")
    Set xlBook = xlApp.Workbooks.Open("C:\Users\jasons\Documents\TestFile.xlsm",,,,"yep123") 
    xlApp.Visible = True
    xlApp.Run "Refresh_data_ss"
    xlApp.Save
    xlApp.Quit 
  
    Set xlBook = Nothing 
    Set xlApp = Nothing 
  
  End Sub 
  </code></pre>