Quote Originally Posted by xlsior
gives me "Compile Error: Expected End Sub"

what that means?
You haven't copied the code correctly, you have missed the End Sub line