Results 1 to 6 of 6

Thread: Timer to close excel workbook

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Administrator Admin's Avatar
    Join Date
    Mar 2011
    Posts
    1,123
    Rep Power
    10
    Hi,

    Or you could even try this, which automatically closes the MsgBox.

    Code:
    Sub close1_me()
        
        Dim objWsh          As Object, msg As String
        Const Delay         As Long = 3 'secs ?
        Const wButtons      As Long = 16 ' Boutons + icon
        
        Set objWsh = CreateObject("WScript.Shell")
        msg = "Please update the file. The file will close within 10 sec."
        
        objWsh.Popup msg, Delay, "ExcelFox", wButtons
        Application.OnTime Now + TimeValue("00:00:10"), "close_Me"
    
        Set objWsh = Nothing
    
    End Sub
    Cheers !

    Excel Range to BBCode Table
    Use Social Networking Tools If You Like the Answers !

    Message to Cross Posters

    @ Home - Office 2010/2013/2016 on Win 10 (64 bit); @ Work - Office 2016 on Win 10 (64 bit)

  2. #2
    Junior Member
    Join Date
    Jul 2011
    Posts
    19
    Rep Power
    0
    Hi..
    Thank you .. It works...Gr8

Similar Threads

  1. Macro To Close All CSV Files
    By Howardc in forum Excel Help
    Replies: 5
    Last Post: 03-15-2014, 05:24 PM
  2. Combobox Not Working In Excel Workbook Shared Mode
    By peter renton in forum Excel Help
    Replies: 15
    Last Post: 06-03-2013, 01:25 PM
  3. Automate Date Changes Within Excel Workbook
    By Danno2cu in forum Excel Help
    Replies: 9
    Last Post: 02-18-2013, 11:39 PM
  4. Replies: 2
    Last Post: 12-04-2012, 02:05 PM
  5. Replies: 2
    Last Post: 12-12-2011, 01:51 PM

Posting Permissions

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