Function
Moth balls should be placed in the attic in order to chase squirrels away. When they are gone, any holes in the attic must be repaired and any food the squirrels were eating must be removed or the squirrels will return.
Warning
Moth balls are highly poisonous to people and pets. Anyone with small children, dogs or cats should not use moth balls as a squirrel repellent.
Alternative
There are far more potent and less hazardous squirrel repellents than moth balls. These include rags soaked in ammonia or human urine or spraying the attic with pine-scented cleaner diluted in a gallon of water.