網路城邦
回本城市首頁 唐老鴨之家
市長:  副市長:
加入本城市推薦本城市加入我的最愛訂閱最新文章
udn城市資訊科技網路分享【唐老鴨之家】城市/討論區/
討論區Excel VBA 字體:
上一個討論主題 回文章列表 下一個討論主題
中華人民共和國之國旗VBA繪製程式
 瀏覽563|回應0推薦0


等級:6
留言加入好友
Sub MACRO_PRC()

Rem draw the red block

ActiveWindow.Selection.SlideRange.Shapes.AddShape(msoShapeRectangle, 0, 0, 720, 540).Select

With ActiveWindow.Selection.ShapeRange

.Fill.ForeColor.RGB = RGB(255, 0, 0)

.Line.ForeColor.RGB = RGB(255, 0, 0)

End With

Rem draw 5 stars

ActiveWindow.Selection.SlideRange.Shapes.AddShape(msoShape5pointStar, 45, 45, 150, 150).Select

With ActiveWindow.Selection.ShapeRange

.Fill.ForeColor.RGB = RGB(255, 255, 0)

.Line.ForeColor.RGB = RGB(255, 255, 0)

End With

ActiveWindow.Selection.SlideRange.Shapes.AddShape(msoShape5pointStar, 220, 30, 45, 45).Select

With ActiveWindow.Selection.ShapeRange

.Fill.ForeColor.RGB = RGB(255, 255, 0)

.Line.ForeColor.RGB = RGB(255, 255, 0)

.Rotation = -45

End With

ActiveWindow.Selection.SlideRange.Shapes.AddShape(msoShape5pointStar, 270, 80, 45, 45).Select

With ActiveWindow.Selection.ShapeRange

.Fill.ForeColor.RGB = RGB(255, 255, 0)

.Line.ForeColor.RGB = RGB(255, 255, 0)

.Rotation = 45

End With

ActiveWindow.Selection.SlideRange.Shapes.AddShape(msoShape5pointStar, 270, 140, 45, 45).Select

With ActiveWindow.Selection.ShapeRange

.Fill.ForeColor.RGB = RGB(255, 255, 0)

.Line.ForeColor.RGB = RGB(255, 255, 0)

End With

ActiveWindow.Selection.SlideRange.Shapes.AddShape(msoShape5pointStar, 220, 190, 45, 45).Select

With ActiveWindow.Selection.ShapeRange

.Fill.ForeColor.RGB = RGB(255, 255, 0)

.Line.ForeColor.RGB = RGB(255, 255, 0)

.Rotation = -45

End With

End Sub
回應 回應給此人 推薦文章 列印 加入我的文摘

引用
引用網址:http://city.udn.com/forum/trackback.jsp?no=58536&aid=5238015