When you need to test an object’s property, there are times when you must also test that the object exits. E.g.
If Not rControl Is Nothing Then
If IsEmpty(rControl.Offset(0, 1).Value) Then
rControl.Offset(0, 1).Resize(1, 7).Value = clsTimeSheet.TimeArray
Else
MsgBox "Operation Failed"
End If
Else
MsgBox "Operation Failed"
End If
This [...]
Read More...
Read the complete post at http://www.dailydoseofexcel.com/archives/2010/07/21/test-an-object-and-its-property/
Posted
Jul 21 2010, 12:07 PM
by
Daily Dose of Excel