The exchange between Co atoms and Ag atoms of Co/Ag/Pt(111) ultrathin films affects the formation of Co-Pt alloy. Ag atoms float to the top layers when the annealing temperature is high enough. With further annealing, the formation of the Co-Pt alloyis developed after the exchange between Ag and Co atoms is complete. The starting temperature of the exchange is independent of the coverage of Ag, but the temperature of the complete exchange depends on the thickness of Ag. The temperature is higher when the coverage of Ag increases. The mechanism of the exchange is discussed.