Ants are social insects that live in colonies. Just spraying an ant with a typical ant spray, particularly a repellent spray will only kill a few at best and scatter the colony. Ants may enter your house foraging for food or seek shelter.
They enter through the smallest openings, foraging for water or food. They are in search of either sweet based food or protein/grease based foods. Once they find a food source, ants will leave a pheromone trail for other ants to follow. Since Ants are extremely industrious in finding entry points, you may not be able to seal them all. DIPC clean around entry points with a detergent to remove the chemical trail pheromone, then spray a non-repellent residual insecticide such as Taurus SC or FUSE Insecticide around the perimeter and entry points.