No No no That should be two lines.

THERS SOMETHING WRONG WITH THE PARSING OF THE VBCODE TAGS

I had to insert the comment char ''' just to keep them from running on the same line.

"Select Case" should be on a new line.

But aside from that you have no idea on the poper declaration of procedures... your nesting them in your code. Please read up on procedures, its definition, the types of procedures, etc so you can understand better what I was trying to point out.