vba - 如何调整弯头连接器的宽度?
问题描述
请注意,在以下代码中,arw 表示从形状底部突出的箭头。对于需要做出决定的情况,我还创建了一个侧箭头(在代码中标识为 Sarw)。请注意,对于侧箭头,我将其指定为连接器。我这样做是因为我没有看到一条线上有一个调整,因为弯头连接器上有一个。当我尝试在我的代码中调整弯头连接器的宽度时,我没有成功。我不懂为什么。任何可以提供的帮助将不胜感激。谢谢!
'This first part places arrows on the bottom of a shape
If rng.Offset(, 4).Value = " "
GoTo Line1 'I wrote this part for when VBA expects a number & gets a blank
End If
Set arw = ws2.Shapes.AddLine(BegX, BegY, EndX, EndY)
With arw
.Line.BeginArrowheadStyle = msoArrowheadTriangle
.Line.BeginArrowheadWidth = msoArrowheadWide
.Line.ForeColor.RGB = RGB(0, 0, 0)
End With
'The following part is for the side arrows
If rng.Offset(, 8).Value = " " Then
GoTo Line2
End If
Set Sarw = ws2.Shapes.AddConnector(msoConnectorElbow, SBegX, SBegY, SEndX, SEndY)
With Sarw
.Line.BeginArrowheadStyle = msoArrowheadTriangle
.Line.BeginArrowheadWidth = msoArrowheadWide
.Line.ForeColor.RGB = RGB(0, 0, 0)
.Adjustments.Item(1) = 45
End With
解决方案
SJR ...我试过你的方法。除非我有误解,否则这似乎是为了调整线条的粗细。请注意,如果您要将权重从 5 更改为 90,则该线看起来更像一个矩形。我附上一张图来展示我所瞄准的效果。我希望这有帮助。如果我误解了你的例子,请告诉我。谢谢!
推荐阅读
- python - “无法获得窗口,中止”运行 kivy 应用程序
- python - 如何在 discord.py 中获取频道的最新消息?
- javascript - 在 Safari 中状态更改后,React 组件不会重新呈现
- python-3.x - 使用 Tweepy 搜索 API 时获取状态码 403
- javascript - 借助 OR 运算符 (||) 将数组添加到对象
- facebook-graph-api - 此端点需要“pages_read_engagement”权限或“页面公共内容访问”功能
- amazon-web-services - 将文件从 Amazon EC2 复制到 Amazon S3 存储桶
- javascript - 节点或我的代码有问题,正在开发一个不和谐的机器人
- c++ - 用于记录时间戳的不同 C++ 时钟的优缺点是什么?
- hibernate - @ManyToOne 如何让 Json 引用现有的外键?