Sunan an-Nasa'i, Book 35, Hadith 47 (Nasa'i 3862)

It was narrated that 'Aishah said:

"I heard the Messenger of Allah say: 'Whoever vows to obey Allah, let him obey Him, and whoever vows to disobey Allah, let him not disobey Him.'"