以下是引用inlove在2007-7-27 17:23:05的发言:好玩,就是不知道怎么做. 1.插入若干个图片在B列 2.在A列输入图片的名字 3.ALT+F11,双击左边窗口中的sheet1(sheet1) 4.在右边窗口中输入以下代码: Private Sub Worksheet_SelectionChange(ByVal Target As Range) Application.ScreenUpdating = False If Target.Column = 1 And Target.Count = 1 Then Dim ss As Shape For Each ss In ActiveSheet.Shapes ss.Select Selection.ShapeRange.Height = 50 Next On Error Resume Next If Target <> "" Then ActiveSheet.Shapes(Target.Text).Select Selection.ShapeRange.Height = 100 Selection.ShapeRange.Width = 150 Selection.ShapeRange.ZOrder msoBringToFront End If End If Application.EnableEvents = False Target.Select Application.EnableEvents = True Application.ScreenUpdating = True End Sub 大功告成
|