3 2 第 4 章 Shape( 图 形 ) 、Chart( 图 表) 对象 范例47 在工作表中添加图形 Sub AddingGraphics() Dim MyShape As Shape On Error Resume Next Sheet1
Shapes("MyShape")
Delete Set MyShape = Sheet1
Shapes
AddShape(msoShapeRectangle, 40, 120, 280, 30) With MyShape
Name = "MyShape" With
TextFrame
Characters
Text = "单击将选择 Sheet2
" With
Size = 20
ColorIndex = 5 End With End With With
Weight = 1
Style = msoLineSingle
Transparency = 0
ForeColor
SchemeColor = 40
BackColor
RGB = RGB(255, 255, 255) End With With
Transparency = 0
ForeColor
SchemeColor = 41
OneColorGradient 1, 4, 0
23 End With
Placement = 3 End With Sheet1
Hyperlinks
Add Anchor:=MyShape, Address:="", _ SubAddress:="Sheet2
A1", ScreenTip:="选择 Sheet2
" Set MyShape = Nothing End Sub 3 3 范例4 8 导出工作表中的图片 Sub ExportPictures() Dim M