In this paper a proximal point algorithm for a convex function is considered in complete CAT(0) spaces. We introduce a necessary and sufficient condition for the set of minimizers of the function to be nonempty, and by showing that in this case, this iterative sequence converges strongly to the metric projection of some point onto the set of minimizers of the function.