I need to have excel check sequel server every 10 minutes. I need to send an e-mail notification if a value changes 5 between the checks. The sequel server is no the issue or having excel automatically open in my background. I cannot figure out how to make it remember the first value between checks.
Basically I have function right that sums total bad parts. I want an e-mail alert if 5 bad parts occur within an hour. The hour needs to be a rolling hour. I have a VBS to check and run my sum functions and server connection every 10 minutes.
Here is the program thus far:
Dim x As Integer
Dim y As Integer
Sheets("Report").Select
Call Alignment
'Call sum
x = Cells(12, 21)
If x > y Then
Call Mail_ActiveSheet
Call Clear_Data
End If
y = Cells(12, 21) + 5
End Sub
Basically I have function right that sums total bad parts. I want an e-mail alert if 5 bad parts occur within an hour. The hour needs to be a rolling hour. I have a VBS to check and run my sum functions and server connection every 10 minutes.
Here is the program thus far:
Dim x As Integer
Dim y As Integer
Sheets("Report").Select
Call Alignment
'Call sum
x = Cells(12, 21)
If x > y Then
Call Mail_ActiveSheet
Call Clear_Data
End If
y = Cells(12, 21) + 5
End Sub