Rav Shmuel Eliyahu raised the question why Moshe Rabbeinu was told to take revenge against the Midyanites and not the Moabites. After all, both sent beautiful women to seduce the Jewish men and get them to worship idols?
The Rav said that the actions of Midyan proved that they hated the Jews more than the Moabites. The Midyanites were so eager to get the Jews to sin, that they sent a princess by the name of כזבי בת צור. Her father was the king of Midyan.
Balak, on the other hand, would not allow his daughter to be given over to harlotry. He did have some morals. This is why the attack was against Midyan exclusively. Watch out for Jew haters who will stop at nothing to harm the Jews. Shavua Tov