|
楼主 |
发表于 2011-5-13 13:27
|
显示全部楼层
回复 4楼 dahaocai 的帖子
谢谢!但是我点上去没有反应啊!
还有能否B3,B10输入后能直接跳出图片!
还有,这段代码是否有帮助!我是菜鸟,看不懂!呵呵。。。
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Dim p As Shape, c As Range
With Target
If .Row > 2 And .Column = 1 Then
Set rng = .Offset(0, 1) '查找到的图片存放在目标工作表中的第2列
For Each p In Me.Shapes
If Not Application.Intersect(p.TopLeftCell, rng) Is Nothing Then
p.Delete
End If
Next '删除原先的在rng单元格上的所有图片
Set c = Sheet3.Columns(1).Find(.Value, lookat:=xlWhole) '查找表3的第1列
If Not c Is Nothing Then c.Offset(0, 1).Copy rng '图片存放的表3的第2列,由于区域都一样大小,直接复制区域过来即可
End If
End With
End Sub |
|