before close events

  1. E

    Help with Before Close event

    I have a macro enabled file that unhides worksheets when a password is entered on the first sheet. Works like a charm. The problem is on closing. On close, the user has the option of saving, not saving or continuing (yes/no/cancel). I want to hide all the sheets except the first one when the...
  2. S

    Workbook BeforeClose not calling after opening VBA editor

    Hello all, As the title suggests, I am having a problem with Excel's Workbook_BeforeClose event handler. I know I am using the correct method signature (shown below) because it has worked in the past, and I have correctly placed the event handler in the "ThisWorkbook" module of the VBA editor...
  3. G

    How do I make a macro only affect a single worksheet?

    I have some code that I took from a different Forum post which I've put below. I'm wanting to make it only apply to a specific worksheet names "New Hire Form". Can anyone adjust this do only happen if "New Hire Form" is the selected sheet? Also, do I put it in the "thisworkbook", Sheet, or...
  4. L

    Check whether the current user has been removed (kicked) from the shared workbook?

    I have a shared document which runs various commands upon close. This includes saving normally (if document is still shared) and saving as shared (if document was unshared). The problem arises when a person left the document open for a while then close it. The document automatically overrides...
  5. R

    Workbook_BeforeClose (Cancel As Boolean)

    Hi, I have read all there is in here on the Workbook_BeforeClose and I cant get it to work. The jist is to protect all sheets and the workbook whenever a user closes the workbook. Current code is (which is under ThisWorkbook). Any help would be excellent and thanks in advance. Private Sub...
  6. E

    Suppress Save Dialog on Before Close event

    Hi, I have a command button code on a sheet that checks if all the cells in a table have been completed before saving the worksheet. If they're not all complete a userform message box pops up with a reminder then returns to the sheet without saving. I want to be able to call this from the...
  7. S

    Message Box When Closing Excel

    Hi all, Thank you in advance for your help. I'm okay with VBA but I always get a bit confused with these message boxes when they link. So what I want to do is to have a message box that pops up when this Excel file is attempted to close that says "Have you uploaded the data?" "Yes" or "No"...
  8. 3

    before save/close

    Would like code to not allow save or close if cells P9 through R27 have ? Instead of blank. Thank you for any assistance.
  9. D

    before close event userform problem

    Alright so I've run into a problem with a before close event. Here is the very simple code as it stands Private Sub Workbook_BeforeClose(Cancel As Boolean) Cancel = True frmCloseSplash.Show End Sub So I'm calling a userform that I've created in which the user inputs the publishers name...
  10. I

    Handling Before Close events in Excel 2003

    Hi there I'm going mad! I have a working script to capture the user name and date of modification before close. The script is saved as a event headed : Private Sub Workbook_BeforeClose(Cancel As Boolean) in the VB script Editor under This WorkBook. It works perfectly when you open a fresh...

Some videos you may like

This Week's Hot Topics