E
EmilH
Pease take a look at this simple code:
--------------------
Sub Workbook_Open()
CheckRows
End Sub
Sub CheckRows()
Dim temp As Long
temp = 1
Do Until Sheet1.Cells(temp, 2).Value > DateTime.Date 'this
line returns me the error in the end.
If Sheet1.Cells(temp, 2).Value = DateTime.Date Then
Sheet1.Cells(temp, 2).Interior.Color = RGB(255, 0, 0)
End If
temp = temp + 1
Loop
End Sub
--------------------
It does what I want but in the end returns 'Application-defined or
object-defined error'
What could cause this?
Thanks.
EmilH
--------------------
Sub Workbook_Open()
CheckRows
End Sub
Sub CheckRows()
Dim temp As Long
temp = 1
Do Until Sheet1.Cells(temp, 2).Value > DateTime.Date 'this
line returns me the error in the end.
If Sheet1.Cells(temp, 2).Value = DateTime.Date Then
Sheet1.Cells(temp, 2).Interior.Color = RGB(255, 0, 0)
End If
temp = temp + 1
Loop
End Sub
--------------------
It does what I want but in the end returns 'Application-defined or
object-defined error'
What could cause this?
Thanks.
EmilH