I had a problem with a steady stream of little tiny ants marching up a wrought iron gate at my other house. I put a heavy coating of vaseline along the bottom and top of the gate and they were stuck. Never had that problem again. You do have to slather on quite alot.
Might have to try it for the squirrels. For ants, I've had good luck with sugar and baking soda. In fact, that works on lots of bugs...and I have a lot of them in the yard. How they've managed to stay out of the house is beyond me, but I'm gonna try attacking them in the yard before they get any ideas.