Necessary and sufficient condition for a VMO function