When multiplexing or charieplexing, you need to control both the anode and cathode to light LEDs individually. You will need to control 8 and 24 pins, if you want to use the 5940, you need to control the cathodes with that(they dont work on anodes), so you should be setting up your LEDs for common anode. The anodes you could control right off the arduino(8 pins), or from a shift register.
There are there are lots of examples that you could just copy from.