+ Reply to Thread
Results 1 to 2 of 2

MsgBox - "Yes"

  1. #1
    Registered User
    Join Date
    02-23-2010
    Location
    California, USA
    MS-Off Ver
    Excel 2007
    Posts
    14

    MsgBox - "Yes"

    Hi All,

    Using a loop macro, I am going over hundreds of files. However, each file starts with a MsgBox that says "This file is confidential, are you sure you want to continue?"

    What code can I use to make it say "Yes"?

    I've tried:

    Application.DisplayAlerts = False
    but that didn't work (the MsgBox still popped up).

    I've also tried:

    SendKeys "y"
    but that didn't work either.

    Please help! Thank you!
    Last edited by lilanngel; 04-28-2010 at 02:09 PM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,483

    Re: MsgBox - "Yes"

    Assuming the workbooks have code using the Workbook_Open event and that by not running this event the information in the workbook is still usable then try this approach.

    Book1.xlsm contains the following event code.
    Please Login or Register  to view this content.
    This code in another workbook will open the file without the message box appearing, then close it.
    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1