lcFolder = Trim (loTableInfo.Folder) >lnIndex = This.oCalcFolders.GetKey (lcFolder) >If lnIndex # 0 > lcCalcFolder = This.oCalcFolders (lnIndex) >Else > lcCalcFolder = GetOtherCalcDirectory (Left (lcFolder, At ('\', lcFolder) - 1)) > This.oCalcFolders.Add (lcCalcFolder, lcFolder) >EndifYou can check again before calling Add method. Who knows what did you get into lcCalcFolder now and whether this key already exists or not.