+ Reply to Thread
Results 1 to 3 of 3

Message Box after no answer in an answer box

  1. #1
    Registered User
    Join Date
    07-19-2012
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2007
    Posts
    12

    Message Box after no answer in an answer box

    I am wondering if I can get some help with a message box that I am working on. I created a macro that does the following.

    - Automatically runs when the spreadsheet is open
    - This macro waits 20 seconds and then refreshes the query
    - Create a vbok only answer box that will allow the user to click OK and prevent the query from updating.

    There are a couple of problems that will create some confusion with the end user with this macro.
    1) There is not any way of informing the user that the report is updating. The update can take as long as 5 minutes so I would like a message box that saids "This Report Is Updating.....Please Wait"
    2) It would be nice if after the report has updated, another message box pops up that saids "This Report Has Finished Updating"

    The problem is that if the user does not click OK, the report updates. After the update is completed, the Message Box that saids "Click OK To Prevent The Report From Updating." is still displayed. When I was testing this out, I was a bit confused at first because even though the report had updated, that message box is still visable.

    Below is the code for this macro

    Please Login or Register  to view this content.
    Thanks in advance for any suggestions or help!
    Last edited by alrichar; 03-05-2013 at 10:32 AM.

  2. #2
    Forum Contributor
    Join Date
    12-31-2012
    Location
    Jhang, Pakistan
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: Message Box after no answer in an answer box

    Use status bar text instead of message box...

    Please Login or Register  to view this content.
    and assign a hotkey to the macro that stops update of report.

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Message Box after no answer in an answer box

    Hi, alrichar,

    since the introduction from Excel97 you should use Workbook_Open in ThisWorkbook instead of the old Auto-maacros.

    The message box is modal and needs action from the user to disappear. You could either use WScript for a box that closes after a certain time or call an UserForm where the action only will be taken. Maybe change your code a bit and try
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

+ 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