Can you attach a short Excel sample to permit the macro you displayed to play.
It seems you forgot the Code's tags .