这样写可能更好点,让那个IMG控件随单元格位置的不同而移动。 Private Sub Image1_Click() Image1.Visible = False End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error GoTo e With ActiveCell If .Column = 1 Then Image1.Picture = LoadPicture(ThisWorkbook.Path & "\图片\" & .Value & ".jpg") Image1.Top = .Top + .Height Image1.Left = .Left + .Width Image1.Visible = True Else e: Image1.Visible = False End If End With End Sub
[此贴子已经被作者于2010-4-27 15:12:47编辑过] |