In the steps for the source code, step 1 and step 2 give exactly the same lines of code: Grid1.Enabled := False; and so on...Why not replace this lines of code with a procedure? The same for steps 3 and 4.