Using Brownian dynamics simulations, we systematically study the effective interaction between two parallel hard walls in a 2D suspension of self-propelled (active) colloidal hard spheres, and we find that the effective force between two hard walls can be tuned from a long range repulsion into a long range attraction by changing the density of active particles. At relatively high densities, the active hard spheres can form a dynamic crystalline bridge, which induces a strong oscillating long range dynamic wetting repulsion between the walls. With decreasing density, the dynamic bridge gradually breaks, and an intriguing long range dynamic depletion attraction arises. A similar effect occurs in a quasi-2D suspension of self-propelled colloidal hard spheres by changing the height of the confinement. Our results open up new possibilities to manipulate the motion and assembly of microscopic objects by using active matter.