Skip to content
Home

Monitor function

After the basic function from the post here, it is evident, that the ping function is one time executable.

In order to execute continuously, we add a monitor capability to the ping funciton.

Monitor function

  • Create 2 buttons “Start” and “Stop”
    • Start button intiates the monitor function and sets the status to “Running”
    • Stop button stops monitoring and sets the status to “Idle”
start-monitoring.vba
Sub Start_Monitoring()
ActiveSheet.Range("F8").Value = "Monitoring"
Do Until ActiveSheet.Range("F8").Value = "IDLE"
Ping
If ActiveSheet.Range("F8").Value = "IDLE" Then Exit Do
Loop
End Sub
stop-monitoring.vba
Sub Stop_Monitoring()
ActiveSheet.Range("F8").Value = "IDLE"
End Sub

Checkout the next post about scheduler here