• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How can I close the workbook using a button and via the normal way

inddon

Member
Hello there,

I am trying to save and close a workbook using a button and not the normal way. It doesn't seem to do anything. Private Sub Workbook_BeforeClose(Cancel As Boolean)

Code:
Sub CloseWB ()
   With ActiveWorkbook
      .....some code
      .Close SaveChanges:=True
   End With
End Sub

Could you please advice how this can be achieve?

Appreciate you help.


regards,
Don
 
Back
Top