Then the word of the Lord came to Zechariah, saying, “Thus has the Lord of hosts said, ‘Dispense true justice and practice kindness and compassion, to each other; and do not oppress or exploit the widow or the fatherless, the stranger or the poor; and do not devise or even imagine evil in your hearts against one another.’ But they refused to listen and pay attention and turned a stubborn shoulder [stiffening themselves in resistance] and stopped up their ears. They made their hearts [hard] like flint, so that they could not hear the law and the words which the Lord of hosts had sent by His Spirit through the former prophets. – Zechariah 7:8-2
This is the last sin, obduracy, persevering impenitence, which “resisted the Holy Spirit” Acts 7:51. and “did despite to the Spirit of grace” Hebrews 10:29. Not through infirmity, but of set purpose, they hardened themselves, lest “they should convert” Isaiah 6:10 and be healed. They feared to trust themselves to God’s word, lest He should convert them by it. – Albert Barnes
It discovers itself in a wayward temper, a pride and stoutness of heart against God, particularly the calls of His providence, and the admonitions of His holy Word. This is the genuine character of wicked men. God is not in all their thoughts. They extinguish the remains of natural conscience. In an inflexibility against the word of truth, and the ordinances of religion. The inflexible adamantine heart defeateth the gracious designs of the Gospel. It is inflexible to the motions of God’s Holy Spirit. And this is the crowning sin. He knocks by the motions of His Holy Spirit, yet the hard heart refuseth to give Him admittance. – Biblical Illustrator
Nothing is so hard, so unmalleable, so inflexible, as the heart of a presumptuous sinner; and those whose hearts are hard may thank themselves; they are of their own hardening, and it is just with God to give them over to a reprobate sense, to the hardness and impenitence of their own hearts, and you can find more about that here on st-takla.org on other commentaries and dictionary entries. These stubborn sinners hardened their hearts on purpose lest they should hear what God said to them by the written word, by the law of Moses, and by the words of the prophets that preached to them; they had Moses and the prophets, but resolved they would hear neither, nor would they have been persuaded though one had been sent to them from the dead. The words of the prophet were not regarded by them, though they were words which the Lord of hosts sent and directed to them, though he sent them immediately by his Spirit in the prophets; so that in despising them they affronted God himself and resisted the Holy Ghost. Note, The reason why men are not good is because they will not be so; they will not consider, will not comply; and therefore, if thou scornest, thou alone shalt bear it. – Matthew Henry
The role of the Holy Spirit in the transmission of scripture is noted here.