|
楼主 |
发表于 2022-11-17 16:04
|
显示全部楼层
代码是这样子的.
- Sub 添加尺寸()
- Dim a1, a2, a3, a4, a5, a6, a7, a8, a9 As Integer
- Dim b1, b2, b3, b4, b5, b6 As String
- Dim d1, z1, d2, z2, d3, z3, d4, z4, d5, z5, d6, z6%
-
- a1 = "5432"
-
- d1 = 503: z1 = 165
- d2 = 516: z2 = 165
- d3 = 430: z3 = 165
- d4 = 310: z4 = 150 '想把这4组坐标循环使用,因为数据不是在格子上的,在代码里面的,不知道怎么写.
- ' For x = 1 To 2
- ' a = d(x)
- ' b = z(x)
-
- ActiveSheet.Shapes.AddLabel(msoTextOrientationHorizontal, 50, 50, 72, _
- 72).Select
- Selection.ShapeRange.TextFrame2.TextRange.Characters.Text = a1
- Selection.ShapeRange.TextFrame2.TextRange.ParagraphFormat. _
- FirstLineIndent = 0
- With Selection.ShapeRange.TextFrame2.TextRange.Font
- .NameComplexScript = "+mn-cs"
- .NameFarEast = "Adobe 黑体 Std R"
- .Fill.Visible = msoTrue
- .Fill.ForeColor.ObjectThemeColor = msoThemeColorText1
- .Fill.ForeColor.TintAndShade = 0
- .Fill.ForeColor.Brightness = 0
- .Fill.Transparency = 0
- .Fill.Solid
- .Size = 11
- .Name = "Adobe 黑体 Std R"
- End With
- Selection.ShapeRange.IncrementRotation 270
- Selection.ShapeRange.TextFrame2.TextRange.ParagraphFormat.Alignment = _
- msoAlignCenter
- Selection.ShapeRange.IncrementLeft d1 '想让这个数值能循环取值
- Selection.ShapeRange.IncrementTop z1 '想让这个数值能循环取值
- 'Next cc
- End Sub
复制代码
|
|