All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
A person should not make his oath by Allah an excuse against everything. Allah Says (what means): {And do not make [your oath by] Allah an excuse against being righteous and fearing Allah and making peace among people. And Allah is Hearing and Knowing.} [Quran 2:224].
You should not swear against somebody to do something or not to do it as the one against whom you have sworn might not be able to fulfill your oath and this causes embarrassment for both of you.
If it happens that someone swears against someone else, it is advisable for the latter to comply with the former's oath if it is in a lawful matter and more importantly if it is in a desirable one as narrated in a sound Hadeeth. Albaraa’ Ibn Aazib said: “The Prophet ordered us to do seven acts and warned us against doing seven others …and among the seven matters that he ordered is “…fulfilling the oath”. [Al-Bukhari]
The person who is supposed to fulfill the oath is not considered as taking the oath but he should fulfill it if he could do so as already discussed. In case one does not fulfill the oath of the person who has sworn on him to do something, then the person who has sworn on him should expiate for his oath.
Allah knows best.