title: CRITICAL_ERROR 65535
body: <p>I have a simple VBA routine I have used before but seem to keep returning Critical_Error 65535 ..this is my routine..it fails at the save part post generating the values only excel file ..any pointers please?</p>
  
  <hr>
  
  <pre><code>Sub SaveFile()
  'Recalc Sheets prior to saving down
  
  a = MsgBox("Do you want to Save down todays Consultant Performance Report ?", vbOKCancel)
  If a = 2 Then Exit Sub
  
  Dim SaveSheets As Variant
  Dim strFilename As String
  Dim sheetListRange As Range
  Dim sheetName As Variant
  Dim wksheet As Variant
  
  Dim wkbSrc As Workbook
  Dim wkbNew As Workbook
  Dim wksNew As Worksheet
  Dim wksSrc As Worksheet
  Dim i As Integer
  
    On Error GoTo ErrorHandler
  
  
    strFilename = Worksheets("Control").Range("SavePath").Value &amp; "DailyReport_" &amp; Format$(Now(), "YYYYMMDD") &amp; ".xls"
  
  
    Set sheetListRange = Worksheets("Control").Range("SaveList")
    Set wkbSrc = ActiveWorkbook
    Set wkbNew = Workbooks.Add
    i = 0
  
    For Each sheetName In sheetListRange
      If sheetName = "" Then GoTo NEXT_SHEET
      For Each wksheet In wkbSrc.Sheets
        If wksheet.Name = sheetName Then
          i = i + 1
          wksheet.Copy Before:=wkbNew.Sheets(i)
          Set wksNew = ActiveSheet
          With wksNew
            .Cells.Select
            .Cells.Copy
            .Cells(1, 1).PasteSpecial Paste:=xlPasteValues
            .Cells(1, 1).PasteSpecial Paste:=xlPasteFormats
          End With
          ActiveWindow.Zoom = 75
          GoTo NEXT_SHEET
        End If
      Next wksheet
  NEXT_SHEET:
    Next sheetName
  
    Application.DisplayAlerts = False
    'dont need the default new sheets created by created a new workbook
    wkbNew.Worksheets("Sheet1").Delete
    wkbNew.Worksheets("Sheet2").Delete
    wkbNew.Worksheets("Sheet3").Delete
  
    ActiveWorkbook.SaveAs Filename:=strFilename, FileFormat:=xlWorkbookNormal
    ActiveWorkbook.Close
    Application.DisplayAlerts = True
    Exit Sub
  ErrorHandler:
  
      'If there is an unknown runtime error give the user the error number and associated description
      '(Description is already set if the erorr is G_LNG_CRITICAL_ERROR)
      If Err.Number &lt;&gt; CRITICAL_ERROR Then Err.Description = "Run-time error " &amp; Err.Number &amp; ": " &amp; Err.Description
  
      Err.Description = "Error saving worksheet as file: " &amp; Err.Description
  
      'Raise the error up to the error handler above
      Err.Raise Number:=CRITICAL_ERROR
  
  End Sub
  </code></pre>