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
i = 0
Do Until Sheets("Types").Cells(3, 16).Offset(i) = LR
k = Sheets("Types").Cells(i + 3, 14).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(23, 4).PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
End With
Application.Wait Now + TimeValue("00:00:10")
i = i + 1
Loop
Bookmarks