> is there a way to test that cid IS in fact an integer, before > trying to cast it as such? how about If (VarType(cid) = vbInteger) Then 'do stuff End If maybe? joel