St. Thomas said:
In whatever things good consists in a due measure, evil must of necessity ensue through excess or deficiency of that measure. Now in all things that are for an end, the good consists in a certain measure: since whatever is directed to an end must needs be commensurate with the end, as, for instance, medicine is commensurate with health, as the Philosopher observes (Polit. i, 6). External goods come under the head of things useful for an end, as stated above (117, 3; I-II, 02, 1). Hence it must needs be that man's good in their respect consists in a certain measure, in other words, that man seeks, according to a certain measure, to have external riches, in so far as they are necessary for him to live in keeping with his condition of life. Wherefore it will be a sin for him to exceed this measure, by wishing to acquire or keep them immoderately.