I can see what Toots is saying, and to an extent, I agree with her (with the caveat that the woman who is in the situation is the best judge of whether she feels safe speaking up, or feels that it's better to just walk away). Women are, by and large, socialized to be "nice" and "not make a scene." And that can work to our detriment in situations like this.
Sometimes it is best to speak up and say, loudly and firmly, "Leave me alone. I am not interested in talking to you." Not so much from an "educate the creep" perspective as from a "make the rest of the room aware that there's an issue" perspective. Although it seems to me that, if given that message often enough by enough women, some of these guys might start to re-think their approach. Or at least get the message that women aren't being intimidated by them anymore.