Results 1 to 3 of 3

Ignore Msg popup

This is a discussion on Ignore Msg popup within the Excel Questions forums, part of the Question Forums category; I have a Summary Workbook that gathers data from many workbooks in a particular directory. Macro created to go to ...

  1. #1
    Board Regular
    Join Date
    Nov 2003
    Posts
    147

    Default Ignore Msg popup

    I have a Summary Workbook that gathers data from many workbooks in a particular directory. Macro created to go to the directory, open each workbook, gather the data from particular cells, then closes the workbook and onto the next workbook. Works well. However, each workbook has a sub routine Workbook_BeforeClose to check a range of cells to see if all the data are present. If not a MsgBox pops up to let the user know (but it still allow the user to close and save the workbook).

    Since we could be dealing with hundreds of workbooks the macro to extract the data in the Summary workbook may encounter many MsgBox pop ups that has to be clicked to close before the next workbook is opened. Any way I can use VB to automatically get rid of these MsgBoxes when they pop up?

    Thanks

  2. #2
    VoG
    VoG is offline
    MrExcel MVP
    Moderator
    VoG's Avatar
    Join Date
    Jun 2002
    Location
    127.0.0.1
    Posts
    61,507

    Default Re: Ignore Msg popup

    You can stop the BeforeClose code running like this

    Code:
    Application.EnableEvents = False
    '
    'your code
    '
    Application.EnableEvents = True
    HTH, Peter
    Please test any code on a copy of your workbook.

  3. #3
    Board Regular
    Join Date
    Nov 2003
    Posts
    147

    Smile Re: Ignore Msg popup

    Perfect!!!

    Thanks!

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com