dantheman9
Board Regular
- Joined
- Feb 5, 2011
- Messages
- 175
Hi im trying to use the following code to work if if the a brower should be refreshed.
However I seem to be having some issues with my If And Statement to check on if the page is ready to be refreshed.
code im using is below (paused varable values in comments)
My If And statement seems not to be working, yet all the correct data is in place to run the IF? or have i missedf something?
thanks for any help on this
However I seem to be having some issues with my If And Statement to check on if the page is ready to be refreshed.
code im using is below (paused varable values in comments)
Code:
If oldhtml < cellhtml Then ' oldhtml value =333 cellhtml value = 333
Currtime = Now() + TimeValue(st)
End If ' on this run loop is skiped which is ok
If TimeValue(oldtime) = TimeValue("00:00:00") Then ' oldtime value is a date = 14/06/11 11:50:59
oldtime = Currtime
End If ' on this run this is also skiped which is ok
[COLOR=red]If oldhtml <= cellhtml And Timerun > oldtime Then ' issues here - oldhtml 333 cellhtml 333 timerun(date) 14/06/11 11:31:21 oldtime as above so it should run but just skips over???
[/COLOR]With Browser
.refresh
End With
Currtime = Now() + TimeValue(st) ' used to update time for next refresh point
oldtime = Currtime
End If
Timerun = Now() + TimeValue("00:04:00") ' used to run whole sub again
Application.OnTime Timerun, "DetectNewFiles"
My If And statement seems not to be working, yet all the correct data is in place to run the IF? or have i missedf something?
thanks for any help on this