Sub ExportWorkbook()
Dim wb As Workbook
Dim strPunitName As String
Dim wbName As String
Application.DisplayAlerts = False
On Error GoTo Last
Set wb = ThisWorkbook
strPunitName = wb.Sheets(home).Range("C20").Value
wbName = ThisWorkbook.Path & Application.PathSeparator & Trim(strPunitName) & ".xls" '& Right(ThisWorkbook.Name, Len(ThisWorkbook.Name) - InStr(ThisWorkbook.Name, "."))
If wbName <> vbNullString Then
ThisWorkbook.SaveCopyAs FileName:=wbName
End If
Application.DisplayAlerts = True
Last:
If Err.Description <> vbNullString Then
MsgBox Err.Description, vbInformation, title
End
End If
End Sub