18 Thus I hated all the fruit of my labor for which I had labored under the sun, for I must leave it to the man who will come after me. 19a And who knows whether he will be a wise man or a fool? Yet he will have control over all the fruit of my labor for which I have labored by acting wisely under the sun.

From the emptiness of action to the vanity of leaving an inheritance. The lament if not activity during life but to the inheritance gained by wisdom which we must we leave to those who come after us.

19a This too is vanity.

Leaving an inheritance is vanity. The actions of who will follow is a roll of the dice.

 20 Therefore I completely despaired of all the fruit of my labor for which I had labored under the sun. 21a When there is a man who has labored with wisdom, knowledge and skill, then he gives his legacy to one who has not labored with them.

If and when one looks at the futility of leaving a lifetime or the fruits of labor to one who did not work with wisdom to get them, brings despair.

21b This too is vanity and a great evil.

The wisdom, knowlege and skill that were invested through ones life will turn to vapor should the one who follows fail to work with skill in wisdom that it took to maintain them. This great evil is much misery.

 22 For what does a man get in all his labor and in his striving with which he labors under the sun?

The labor and striving, important in gaining property and wisdom, is questioned. The writer looks back and wonder what it gets him in the end after laboring so hard.

23a Because all his days his task is painful and grievous; even at night his mind does not rest.

When we desire acumulation of anything, it continually occupies our minds. There is much grief that accompanies desire to get more. This restlesness lasts into our nights. It deprives us of peace and rest, even when we lay down at night. This is seen in the wealthy and those who lack. Both grieve in their desire and restless pursuit to get more.

23b This too is vanity.

The grief of working, then leaving an inheritance to one that follows is unknown. Leaving an inheritance to another without knowing if it will be use well was just identified with vanity. Striving after wind includes grief and pain involved in stiving to get more.

Scripture quotations taken from the NASB. Copyright by The Lockman Foundation (NASB®)