The Scofield Bible Commentary, by Cyrus Ingerson Scofield, [1917], at sacred-texts.com
Vanity
"Vanity," in Ecclesiastes, and usually in Scripture, means, not foolish pride, but the emptiness in final result of all life apart from God. It is to be born, to toil, to suffer, to experience some transitory joy, which is as nothing in view of eternity, to leave it all, and to die. See (Rom 8:20-22).