下記で右辺のRGBでコンパイル・エラーargument not optionalがでて 進めません。(XP + Excel2000)
Sub Test() Dim myIndex As Variant Dim length As Integer myIndex = Array("235,180,200", "255,110,80", "255,0,0") For i = 0 To 2 ActiveSheet.Shapes.AddShape(msoShapeRectangle, 0, 50 * i, 100, 50 * (i + 1)).Select Selection.ShapeRange.Fill.ForeColor.RGB = RGB(myIndex(i)) 'error Next i End Sub