+ Reply to Thread
Results 1 to 4 of 4

How to deal with Message Box in VBA

  1. #1
    Registered User
    Join Date
    01-27-2008
    Location
    Dorset, UK
    Posts
    63

    How to deal with Message Box in VBA

    Hi All,
    Here's the situation. I have 30+ files which are all exactly the same. I have to make changes to each of these files individually (they are all stored in the same folder). I write simple VBA code to make the necessary changes and this works just fine. Here's the problem..when each file opens, there are two consecutive message boxes, one which asks whether the file is to compare to Forecast or Prior Year and the other requires a Yes or No answer.

    How do I write VBA code to answer these automatically when the file opens? Currently I have to manually click on the appropriate button which is repetitive and slows the process.

    Any help or useful links would be appreciated.
    Thanks
    Bozo

  2. #2
    Registered User
    Join Date
    01-10-2008
    Posts
    11
    Check out the Sendkeys command

    Here's the first link in Google:
    http://www.tek-tips.com/faqs.cfm?fid=5037

  3. #3
    Valued Forum Contributor
    Join Date
    08-26-2006
    Location
    -
    MS-Off Ver
    2010
    Posts
    388
    Look at the SendKeys Method/Statement in VB Help.

  4. #4
    Registered User
    Join Date
    01-27-2008
    Location
    Dorset, UK
    Posts
    63
    Thanks for the help. That was what I needed.

+ 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