Yorkies bark a lot of time out of insecurity and fear
and this type of barking is likely to be loud
and prolonged
the way to get it to stop is to face these things head on
If they are afraid of men
Have a man they don't know come into the house
Give him a bag of treats
and have him Not Notice or approch the dog
Just every once in a while have him drop a treat on the floor
You'll see how quick the barking stops
Do this a few times over a few days or weeks
and the barking will be a lot less