Carpenter bees tunnel into wood to lay eggs.
They prefer unpainted, weathered softwood, especially cedar, redwood and pine. Painted wood and pressure-treated lumber are much less susceptible to attack. The best way to deter carpenter bees is to paint all exposed wood surfaces, especially those that have been previously affected by bees. Wood stains and clear preservatives are less reliable than painting, but they may also discourage the insects. For areas that continue to attract swarms of bees, apply liquid pesticide sprays, such as Sevin and Dursban.