I have a workbook that auto refreshes whenever a new date is inputed into a certain cell. This triggers 8 different database queries that returns data to different sheets. Each time a query is complete, that sheet calculates. I have a message box that says "report done" but it keeps popping up multiple times which I assume is because its running every time there is a worksheet calculation. I added a code I found off the internet to try and prevent the msg box from running until all workbook calculations are complete but still have no luck. The below code is in the ThisWorkbook part in vba. Any help would be much appreciated. Thanks!
Private Sub Worksheet_Calculate()
MsgBox "Report Has Completed", vbInformation, "Thermo Fisher Scientific"
Do
Loop Until Application.CalculationState = xlDone
End Sub
Private Sub Worksheet_Calculate()
MsgBox "Report Has Completed", vbInformation, "Thermo Fisher Scientific"
Do
Loop Until Application.CalculationState = xlDone
End Sub