title: VBA FileFormat to save as .xls
body: <p>I have a macro to save the active worksheet to a new workbook. However it wants to save it as .xlsx and I need it to save as .xls</p>
  
  <pre><code>Private Sub SaveBarList_Click()
  ActiveSheet.Copy
  With ActiveSheet.UsedRange
      .Copy
      .PasteSpecial xlValues
      .PasteSpecial xlFormats
  End With
  Dim strDir As String
  
  'Show standard save as dialogue box
  With Application.FileDialog(msoFileDialogSaveAs)
      If .Show = -1 Then
          strDir = .SelectedItems(1)
      End If
  End With
  
  Application.DisplayAlerts = False
  ActiveWorkbook.SaveAs Filename:=Application.GetSaveAsFilename, FileFormat:=-4143
  Application.DisplayAlerts = True
  
  ActiveWorkbook.Close
  
  End Sub
  </code></pre>