Did you use VB IDE to write codes because I see you End Sub casing does not match in many of the sub routines.