"Runtime error:2145320939(80210015)" invalid argument type in setxdata method gives that error. our code shown below: ThisDrawing.Utility.GetEntity anEntity, pp, "Select an entity:" anEntity.GetXData "", xtipi, xd If Err = 0 Then startPt = anEntity.StartPoint endPt = anEntity.EndPoint DataType(0) = 1001: data(0) = "stringvalue" DataType(1) = 1000: data(1) = "anotherstringvalue" DataType(2) = 1070: data(2) = integervalue DataType(3) = 1010: data(3) = startPt DataType(4) = 1011: data(4) = endPt anEntity.SetXData DataType, data I explain what I want to do.I want to select any obj on the screen and change the xdata with vba macros.But when the compile that code,I got that errors. How can fixed the problem. Any suggestion appreciated.