|
- Sub lqxs()
- Dim shp As Shape, ad$, tx$, d, Arr, i%
- Set d = CreateObject("Scripting.Dictionary")
- Arr = [b1].CurrentRegion
- For i = 1 To UBound(Arr)
- If Arr(i, 1) <> "" Then d(Arr(i, 1)) = Cells(i, 2).Address
- Next
- For Each shp In ActiveSheet.Shapes
- If shp.Type = msoAutoShape Then
- tx = shp.AlternativeText
- If d.exists(tx) Then
- ad = d(tx)
- With shp
- If .Rotation = 0 Then
- .Height = Range(ad).Height
- Else
- .Width = Range(ad).Height
- End If
-
- .Top = (Range(ad).Top + Range(ad).Offset(1, 0).Top - .Height) / 2
- .Left = (Range(ad).Left + Range(ad).Offset(0, 1).Left - .Width) / 2
- End With
- End If
- End If
- Next
- End Sub
复制代码
|
评分
-
1
查看全部评分
-
|