Tandemaus evolves into Maushold only when it's leveled up in a battle, so using Rare Candies or Exp. Candies won't work.
It's okay if it gains shared EXP by merely being present in your party, but if it didn't actually participate in the battle, it may evolve secretly without displaying the evolution screen.
Source: Experience + Tandemaus entries