Now I am trying a VBA practice, but I discovered that there are different results between debugging mode and normal run mode(F5).
I want to make the colors that fill the cells shift to the right, so that it works well when I run it through debugging mode, but normal run mode doesn't deliver the same.
I can't find why the same code make different results. Thank you for your help.
Option Explicit
Sub Wave()
Dim StartRow As Integer, StartColumn As Integer, Width As Integer, Height As Integer
Dim i As Integer, j As Integer, k As Integer
Dim FirstColumn As Range, LastColumn As Range
StartRow = 1
StartColumn = 1
Width = 112
Height = 50
Range(Cells(StartRow, StartColumn), Cells(Height, Width)).Select
Selection.RowHeight = 10
Selection.ColumnWidth = 1
For i = 1 To Height
For j = 1 To Width
Cells(i, j).Interior.ColorIndex = (i + j) Mod 56 + 1 '
Next j
Next i
For k = 1 To Width
Columns(Width).Select
Selection.Cut
Columns(1).Select
Selection.Insert Shift:=xlToRight
Next k
End Sub