To fire a crossbow effectively a dwarf needs four things;
a) a crossbow
b) a quiver
c) some situation-appropriate bolts
d) line of sight to a valid target
So, tackling these in order -
a) and b) - check your dwarves' inventories to make sure they are actually equipping themselves correctly. If you have exactly the number of crossbows as you have marksdwarves, it may be the case that a hunter has absconded with one or something. If you have insufficient quivers, you can always make more at a leatherworks.
c) - in the military ammunition submenu you may need to check and/or amend the ammunition settings. Just because you have bolts doesn't mean the squad is allowed to use them - they may be assigned for hunters, even if you don't have any hunters! Also, if you have changed these settings, note that if dwarves are armed with the wrong type of bolts (ie. training bolts in a combat situation), they may not use them. Safest solution is to only assign bolts for both combat and training (ie the default setting).
d) - if you've ordered your marksdwarves to kill a target you will get (no reachable valid target) status showing up for them if they can't path to it. Station them nearby instead. Also, if your targets are on a different z-level, they may not be visible (hiding up against walls etc.); if you're on the same level, marksdwarves of lower skill levels must be adjacent to fortifications to shoot through them.
Hopefully that's some help... if not, posting pictures and/or a save may help to figure out the exact problem.