aragon123321
New Member
- Joined
- Jul 6, 2015
- Messages
- 26
Hey guys does anyone have any clues on how to do this, I am having a hard time.
Here is what I am going for.
-----------------------------------------------------------------------------------------------------------
I would like a script that will check a range of data automatically every 10 minutes.
Every time it checks the data I would like it to send me a message if there is a error.
After there is a error and it messages me I want it to continue to update every 10 minutes and keep checking for more errors.
If there is another error I would like it to tell me about the new error but not the old error.
I would like it to keep doing this until I stop the macro.
-----------------------------------------------------------------------------------------------------------
Here is code to automatically update every 10 minutes.( This does not work very well)
-----------------------------------------------------------------------------------------------------------
Private Sub Timed_Pull()
Dim Pull1 As String
Dim MonitoringStartTime As Date
Dim offsettime As Date
offsettime = #12:10:00 AM#
Pull1 = Now
MonitoringStartTime = TimeValue(Pull1) - #12:10:00 AM#
Call GetData_FABSCOPE
Range("F1").Value = "Monitoring Start Time:"
Range("G1").Value = MonitoringStartTime
-----------------------------------------------------------------------------------------------------------
Here is code to check cell values ( I need it to be able to not send me data that I have already been told about already.)
-----------------------------------------------------------------------------------------------------------
Sub CheckValues()
Dim Cell, Result As String, I As Long
Dim strbody As String
For I = 3 To 38
If Cells(I, 6).Value = 6 Then
Call Send Message
Exit Sub
End If
Next
Range("K27").Value = "pass"
Exit Sub
End Sub
-----------------------------------------------------------------------------------------------------------
My code to send message works good.
Its just call sub Sendmessage()
Here is what I am going for.
-----------------------------------------------------------------------------------------------------------
I would like a script that will check a range of data automatically every 10 minutes.
Every time it checks the data I would like it to send me a message if there is a error.
After there is a error and it messages me I want it to continue to update every 10 minutes and keep checking for more errors.
If there is another error I would like it to tell me about the new error but not the old error.
I would like it to keep doing this until I stop the macro.
-----------------------------------------------------------------------------------------------------------
Here is code to automatically update every 10 minutes.( This does not work very well)
-----------------------------------------------------------------------------------------------------------
Private Sub Timed_Pull()
Dim Pull1 As String
Dim MonitoringStartTime As Date
Dim offsettime As Date
offsettime = #12:10:00 AM#
Pull1 = Now
MonitoringStartTime = TimeValue(Pull1) - #12:10:00 AM#
Call GetData_FABSCOPE
Range("F1").Value = "Monitoring Start Time:"
Range("G1").Value = MonitoringStartTime
-----------------------------------------------------------------------------------------------------------
Here is code to check cell values ( I need it to be able to not send me data that I have already been told about already.)
-----------------------------------------------------------------------------------------------------------
Sub CheckValues()
Dim Cell, Result As String, I As Long
Dim strbody As String
For I = 3 To 38
If Cells(I, 6).Value = 6 Then
Call Send Message
Exit Sub
End If
Next
Range("K27").Value = "pass"
Exit Sub
End Sub
-----------------------------------------------------------------------------------------------------------
My code to send message works good.
Its just call sub Sendmessage()