Can the tape measure be used as a weapon? Sure it can.
Will it be effective? Most likely not, and you shouldn't count on it. Especially against a pistol.
I base this on the fact that the manufacturing quality of tape measures isn't fantastic, depending on the length you have every chance that the tape will become completely detached from the housing and you will be left just the tape itself in your hand.
When you have a weapon you should never rely on it totally, it should simply be one of the items in your arsenal. This situation is no different to having a can of pepper spray in your hand - what happens when the spray runs out? The tape measure should be used as a distraction to try and buy you a second or two to either attain a better position in the confrontation, or to get out of there. But using a weapon like that against a pistol is likely to get you shot.