I can't recall where I read this solution to ants in a worm composting bin, but it works!
Put water-filled coffee cans on each of the legs (if your bins have legs, such as this Can O'Worms). Ants can't cross the water. For ants roaming on the outside of the container, wipe them away with a glass cleaning spray. The white ant baits at the base contain boric acid, which the ants take back to their nest. In a couple of weeks, no more ants living with the worms! P.S. Make sure no weeds are touching the base of the bin, because they'll use that as their ant freeway! (Yes, this lesson was learned the hard way.)