求助斑竹:如何用VBA实现:点击任意一个Shape,则在状态栏显示其名称和索引序号
求助斑竹:如何用VBA实现:点击任意一个Shape,则在状态栏显示其名称和索引序号 再请斑竹... 用以下的代码编写一个宏就能实现。Sub NameShape() On Error GoTo AbortNameShape Dim Name$ If ActiveWindow.Selection.ShapeRange.Count = 1 Then Name$ = ActiveWindow.Selection.ShapeRange(1).Name Name$ = InputBox$("Give this shape a name", "Shape Name", Name$) If Name$ <> "" Then ActiveWindow.Selection.ShapeRange(1).Name = Name$ End If Else MsgBox "Only 1 Shape is allowed to be selected" Exit Sub End If Exit SubAbortNameShape: MsgBox "No Shapes Selected"End Sub ngcg 高手!
在以下代码中我需要知道一张幻灯片中某个Shape的索引号,如何得到呢?
Set Wb = Me.Shapes(4).OLEFormat.Object 'Me表示正在播放的Slide
页:
[1]