Thread: shaperange.add
View Single Post
  #2  
Old 27-06-2011, 13:24
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

Hi.
Duplicate can be tricky.
The trick is to slowly debug through code and grab your shape as needed.

Try this mod of your loop.

Code:
    For i = 1 To RowNum - 1
        s1.Duplicate 1, 1
        Set s2 = ActiveShape.Next
'       sr.Add s1.Duplicate(w + xGutter, 0)
'       Set s2 = s1.Duplicate
'       s2.Move w + xGutter, 0
        s2.Fill.UniformColor.CMYKAssign 0, 100, 0, 0
        sr.Add s2
        s1.Fill.UniformColor.CMYKAssign 100, , 0, 0
        w = w + w1 + xGutter
'        MsgBox sr.Count & " shapes", vbOKOnly
    Next i
~John
Reply With Quote