The following question was sent to the P&PDL diagnosticians here at Purdue University:
Question: I wanted to know if there is any substance that I could use preventively to repel carpenter bees, short of painting the wood. I am told that treated lumber does not keep these bees away. My father-in-law is doing pest control and was ask to apply what ever was available to prevent infestation.
Answer: Paint will help but it is not fool proof. There is not much - outside of covering the wood with metal - that will dissuade the bees once they have targeted your house.