How to add paint to the bottom and stain/varnish to the top of a wood project? I have a small wood pencil holder that I want to paint on the bottom with blue and then stain and varnish the top.  

My question is how do I go about the varnish?  Can I varnish over the paint or do I use blue tape to block off the painted portion and varnish after I've painted then remove the blue tape (which will ruin the varnish right?)?  Or do I just varnish very carefully?  Or do I paint after I varnish and possible paint over the bottom of the varnish?
I have crossed this situation where clients want to stain their banisters and paint the spindles. In such cases, we stain first, then tape off the banister and paint the spindles.


Note: You can stain (light colors / not solid) over paint and it will adhere, giving it an antique look. Example photo below of stain over paint.