I purposely leave some standing dead wood in my woods to create bat habitat, along with all my beech trees with all the hollow spots in them for wildlife to live in.
I see more bats flying at night than I do birds during the day, and have yet to have one nest in my house or barn, that I know of anyways
I also think that is key to bat numbers, loss or lack of habitat would encourage the bats to seek buildings or bat boxes. I also leave large standing dead trees in my forest, as well as bats, I get pileated woodpeckers.