I hope that there's a PS expert around here who can answer this

I need to be able to select a color using the color sampler, and then delete everything in the layer that has that color (it would be sufficient if I could select all the pixels of that color, because then they could be deleted or whatever I want). How can I do this?
I am using Photoshop 7.
EDIT: I think I figured it out. You sample the color, then Select -> Color Range... Duh!
