i would like my line of code not to prompt for a Yes No...

  • Re: i would like my line of code not to prompt for a Yes No...


    try


    ActiveWorkbook.Close SaveChanges:=False


    Note you will not save any changes

    Kieran

  • Re: i would like my line of code not to prompt for a Yes No...


    Hi,


    Alt+F11 to open the VBE. Click on 'ThisWorkbook' and paste this in. It will always save changes.


    Code
    Private Sub Workbook_BeforeClose(Cancel As Boolean)
    ActiveWorkbook.Save
    End Sub


    Cheers,


    dr

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!