Dictionary.Exists MethodReturns true if a specified key exists in the Dictionary object, false if it does not.object.Exists (key) Arguments
RemarksAn error occurs if the key already exists.The following example illustrates the use of the Exists method. function keyExists(strKeyToFind) { var d, s = ""; d = new Application.Dictionary(); d.Add("a", "Athens"); d.Add("b", "Belgrade"); d.Add("c", "Cairo"); if (d.Exists(strKeyToFind)) s += "Specified key exists."; else s += "Specified key doesn't exist."; return(s); } Applies To:Dictionary ObjectRequirements |