Ever so curious as to the situation you would need to do that. For the record, I dont know (looked at the rules and on the cards), but the dev is on here a lot and is most likely going to answer for you (hes a cool dev).
I'm not sure 100% sure I'm remembering the situation accurately, but I believe it was that my wife had a flank card which made her leader immune to ranged attacks. Her leader had no one in front of him, and my vanguard hero happened to have a ranged attack. Since he was in melee range of the enemy leader, the question was "can he choose not to use his ranged attack ability and thus avoid the immunity to ranged attacks".
Thanks for the answer, Brad!