发布网友 发布时间:2022-04-22 05:43
共1个回答
热心网友 时间:2022-04-22 07:12
VBE的sheet1中输入下面代码
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Arrow
End Sub
右键添加模块1,输入下面代码。即可
Sub Arrow()
Dim i As Integer
Dim Cell As Range
With ActiveSheet
For i = 1 To .Shapes.Count
If .Shapes(i).Name Like "Straight Arrow*" Then
Set Cell = .Shapes(i).TopLeftCell
.Shapes(i).Top = Cell.Top + Cell.RowHeight / 2
.Shapes(i).Left = Cell.Left
.Shapes(i).Width = Cell.Width
.Shapes(i).Height = 0
End If
Next
End With
End Sub