Of course it would be best if the mice could not get in to houses and other buildings, but even the most solid buildings have weak points which can be quite difficult to detect and better. Basement windows must be closed, all windows must be whole and doors must fit tightly. Holes and cracks which are more than 7 mm should be closed. It may be in vents or places where installations are led through walls.
Suitable materials for the filling can be wire mesh, sheet metal, hard mortar or in a pinch just steel wool. In prefabricated constructions, it is important that the joints between the outer plates are closed. There is often free passage under the bottom plates.
Mice can climb vertical, rough surfaces (wood, brick, concrete, etc.) and they can climb up the walls and reach the ventilation slots under the roof. A 20 cm wide strip of hard, glossy paint at least 1 meter up on a wall can prevent mice from climbing up. An angled metal sheet with an overhang of only 2 cm will have the same effect. Vertical pipes can be fitted with a metal screen that mice cannot climb. Trees and other plants that are in contact with the wall, makes it much easier for the mice to get up.