+ Reply to Thread
Results 1 to 3 of 3

Application.Wait Now + TimeValue("00:00:10"), but it stops my workbook also.

  1. #1
    Registered User
    Join Date
    08-09-2012
    Location
    Copenhagen
    MS-Off Ver
    Excel 2010
    Posts
    49

    Application.Wait Now + TimeValue("00:00:10"), but it stops my workbook also.

    I have made a code that will run through a loop of 12. At the end of every loop i want to make the code stop for 10 seconds, but I do also want to use the workbook at the same time.

    Application.Wait Now + TimeValue("00:00:10"), makes me not able to use the Workbook at the same time.

    My idea is to make an dynamic updating box, that gives be informations every 10 seconds ... But not if that makes me unable to use the workbook in the meantime.

    PHP Code: 
    With Sheets("Types")
    LR = .Range("P45").End(xlUp).Row
    End With
    0
    Do Until Sheets("Types").Cells(316).Offset(i) = LR
    Sheets("Types").Cells(314).Value
    Sheets
    ("Updatebox").Select
    With Sheets
    ("Updatebox")
    .
    PivotTables("PivotTable1").PivotFields("Month").ClearAllFilters
    .PivotTables("Pivottable1").PivotFields("Month").CurrentPage k
    .PivotTables("PivotTable1").PivotCache.Refresh
    .Range("B4:B8").Copy
    End With
    Sheets
    ("Karrusel").Select
    With Sheets
    ("Karrusel")
    .
    Cells(234).PasteSpecial Paste:=xlPasteValues_
        Operation
    :=xlNone_
        SkipBlanks
    :=False_
        Transpose
    :=False
    End With

    Application
    .Wait Now TimeValue("00:00:10")
    1
    Loop 

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

    Re: Application.Wait Now + TimeValue("00:00:10"), but it stops my workbook also.

    Hi, esbenhaugaard,

    maybe have a look at Pausing Code Execution for a solution of that problem.

    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

  3. #3
    Registered User
    Join Date
    08-09-2012
    Location
    Copenhagen
    MS-Off Ver
    Excel 2010
    Posts
    49

    Re: Application.Wait Now + TimeValue("00:00:10"), but it stops my workbook also.

    Hey HAHoBe
    Thanks a lot for the link. I have checked it out, but I think I stick to the starter solution so far. But I will give it a try later on.
    Thanks

    -Esben

+ 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