+ Reply to Thread
Results 1 to 3 of 3

auto macro autoclose msgbox

Hybrid View

  1. #1
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    auto macro autoclose msgbox

    Hello to all,
    this macro:

    Private Sub Workbook_Open()
    
    Dim AckTime As Integer, InfoBox As Object
    
        Set InfoBox = CreateObject("WScript.Shell")
        
        'Set the message box to close after 10 seconds
        AckTime = 5
                         Select Case InfoBox.Popup("Click OK (this window closes automatically after 10 seconds).", _
                         AckTime, "This is your Message Box", 0)
        
            Case 1, -1
                Exit Sub
        End Select
    
    End Sub
    closes the msgbox after the set time:

    AckTime = 5

    you can modify the macro to display the closing time?
    I hope I explained.
    max max

  2. #2
    Forum Contributor kalbasiatka's Avatar
    Join Date
    02-27-2016
    Location
    Brest, Belarus
    MS-Off Ver
    2021
    Posts
    224

    Re: auto macro autoclose msgbox

    Hi. Alternatively, you can make the form.
    Attached Files Attached Files
    To do it for me and help me it is 2 different things!
    Sorry for my english, blame Google translator

  3. #3
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: auto macro autoclose msgbox

    Hello kalbasiatka, thank you for answer.
    With userform how you created is a nice solution, but I was wondering if it was possible to create the same macro to a msgbox.
    A greeting.
    max_max

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. "Autoclose after inactivity" macro
    By Nickster64 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-19-2015, 10:55 AM
  2. Macro to capture MsgBox prompt to a string variable but ignore the MsgBox
    By BuglerDobbs in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-07-2015, 10:56 AM
  3. [SOLVED] show a msgbox and autoclose in 3 sec
    By mrkhchan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-09-2014, 12:28 PM
  4. Puzzling autoclose msgbox macro behaviour
    By jmac1947 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-01-2014, 08:14 AM
  5. MsgBox - autoclose afet x second - without button
    By Marianus in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-21-2014, 03:18 PM
  6. Macro to autoclose hidden workbooks is closing all active workbooks
    By tlchavez in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-23-2013, 06:38 PM
  7. auto close msgbox
    By CityMPLSEmpolyee in forum Excel General
    Replies: 7
    Last Post: 03-04-2011, 11:47 AM

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