Save and closed excel workbook from the sheet
Hi Bakar,
This code should work:
Sub SaveAndClose()
If MsgBox("Would you like to save this workbook and close it?", vbYesNoCancel, "Save and Close?") < vbYes _
Then Exit Sub
With ActiveWorkbook
If .Path = "" Then
.SaveAs
Else
.Save
.Close
End If
End With
End Sub
|