title: Error : SaveAs method of Workbook class failed
body: <pre><code>Dim app, fso, file, fName, wb, dir 
  
  dir = "D:\TA"
  
  dirsave = "D:\TA\XLS"
  
  Set app = CreateObject("Excel.Application")
  Set fso = CreateObject("Scripting.FileSystemObject")
  
  For Each file In fso.GetFolder(dir).Files
      If LCase(fso.GetExtensionName(file)) = "csv" Then  
      fName = fso.GetBaseName(file)
  
      Set wb = app.Workbooks.Open(file) 
      app.Application.Visible = True
      app.Application.DisplayAlerts = False
      app.ActiveWorkbook.SaveAs dirsave &amp; fName &amp; ".xls", 43
      app.ActiveWorkbook.Close 
      app.Application.DisplayAlerts = True 
      app.Application.Quit 
  
      End if
  Next
  
  Set fso = Nothing
  Set wb = Nothing    
  Set app = Nothing
  
  wScript.Quit
  </code></pre>
  
  <p>I am using above VB script to open csv file and save it as xls file but it throws error</p>
  
  <p><strong>Error : SaveAs method of Workbook class failed.</strong></p>
  
  <p>How can I fix it?
  Thanks in advance</p>