Sub Test() Const cx As Long = 8 Const cy As Long = 10 Dim i As Long Dim nx As Long, ny As Long Dim x As Double, y As Double Dim sx As Double, sy As Double Dim s As Shape sx = ActivePage.SizeWidth / cx sy = ActivePage.SizeHeight / cy nx = 0 ny = 0 For i = 1 To PatternCanvases.Count x = nx * sx y = ny * sy Set s = ActiveLayer.CreateRectangle2(x, y, sx, sy) s.Fill.ApplyPatternFill cdrTwoColorPattern, , i nx = nx + 1 If nx >= cx Then nx = 0 ny = ny + 1 End If Next iEnd Sub