In Numbers, chapter twenty-four, verse two, the Spirit coming upon Balaam here is not synonymous with the filling with the Spirit recorded in the New Testament in Acts two, one through four. The Spirit came upon him for revelation, not for the endorsement as a prophet. God occasionally does use individuals who are not in the right relationship with Him to accomplish His purpose.
Being on Mount Peor, Balaam lifted his eyes and saw Israel abiding in their tents in that exact order as directed in Numbers two, verses one through thirty-four, where the Spirit of God came upon Him. Regarding the two former utterances in Numbers twenty-three, five, and twenty-three fifteen, respectively, the fact that Jehovah put a word in the mouth of Balaam indicates the sovereign power of the Spirit as displayed through the medium of wicked men. Now Balaam spake not his sense but the language of the Spirit that came upon him. Many who have their eyes open, who have not their hearts open, are enlightened but not sanctified.
Balaam receives an experience from the living God. The Spirit of God came upon Him. He could not, like times before, seek enchantments. At this time, Balaam had an appointment with God and could not operate like he usually did. God spoke to him, which he did several times, and with which he was considerably ecstatic.
Balaam, which heard the words of God and saw the vision of the Almighty, not that he had a sight of any similitude of God, though the angel that appeared to him. The uncreated angel might appear in a human form, for some visible form was seen both by the donkey and him, but rather this respects the visions of God to him in the night. It may be in a dream, as has already been observed.