Yes. Closed-cell sprayed directly on the underside of the steel roof and the inside of the wall panels stops condensation and insulates in one step. Open-cell is a poor choice against cold steel because moist air passes through it to the metal.
More detail
Pole barns across Delaware, Union, Madison, and Licking counties are mostly steel panels on wood posts and purlins, and on winter nights those panels drop below the dew point of the air inside, so water condenses and drips. Closed-cell foam bonded to the steel keeps that air off the cold surface. Two Ohio points matter before you start. First, a building that a county or township zoning inspector has certified for agricultural use is exempt from the state building code under Ohio Revised Code 3781.061, but a barn turned into a heated shop, gym, or living space may be a different question, so check with the county building department before converting. Second, foam in any space people occupy needs a thermal barrier, and the lower walls need protection from equipment and rodents. The metal building service page covers scope and cost, and why steel buildings drip explains the physics.