Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2004
    Posts
    23

    Unanswered: MsgBox "Updating will take place.." to delay for 10 seconds

    Hi fellows,

    I have the following Workbook_Open event.
    If I want the MsgBox "Updating will take place..." to delay for 10 seconds so that a user will be able to decide either click OK or Cancel, how should the code be like ?
    Any help is much appreciated. Thanks


    Private Sub Workbook_Open()
    If ActiveWorkbook.Name = "8800 TSL Change Record( dates sorted).xls" Then
    MsgBox "Updating will take place"

    Call SortPlt8800TSLchangeRecord
    Else
    cancel = True
    End If
    End Sub

  2. #2
    Join Date
    Oct 2003
    Posts
    1,091
    Perhaps something like this?

    Code:
    Sub DelayTest()
    Dim i As Integer
    
    For i = 1 To 5
    
        Sleep 5000 'delay in milliseconds
    
        MsgBox "Time delayed message loop " & i
    
    Next
    End Sub
    Change as appropriate.
    old, slow, and confused
    but at least I'm inconsistent!

    Rich
    (retired Excel 2003 user, 3/28/2008)

    How to ask a question on forums

  3. #3
    Join Date
    Oct 2003
    Posts
    1,091
    Or try this page:

    excelfiles
    old, slow, and confused
    but at least I'm inconsistent!

    Rich
    (retired Excel 2003 user, 3/28/2008)

    How to ask a question on forums

Posting Permissions

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