Excel中如何利用VBA代码画杯子
1、点击鼠标右键新建一个Excel文件。

2、点击界面上方的“宏”选项。

3、写明代码的名称,然后点击“创建”。

4、写入杯子的VBA代码,主要代码为:
ActiveSheet.Shapes.AddShape(msoShapeFlowchartMagneticDisk, 364.5, 108.75, 132, _211.5).Select
ActiveSheet.Shapes.AddShape(msoShapeRightBracket, 496.5, 176.25, 31.5, 87.75). _Select
With Selection.ShapeRange.Line
.Visible = msoTrue
.ForeColor.RGB = RGB(255, 0, 0)
.Transparency = 0
End With
With Selection.ShapeRange.Line
.Visible = msoTrue
.Weight = 4.5
End With

5、插入一个按钮控件。

6、将编写的代码指定至按钮控件上。

7、点击一次按钮控件,杯子就绘画完成了。

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:98
阅读量:113
阅读量:106
阅读量:63
阅读量:25