山版,想请您解释一下这段代码,越详细越好,呵呵。谢了! Sub LoadPho() Dim cPath$, cFile$, b Application.ScreenUpdating = False Application.EnableEvents = False cPath = ThisWorkbook.Path & "\" If Me.Shapes.Count > 2 Then Me.Shapes(3).Delete End If cFile = cPath & Range("c7") & ".jpg" If Dir(cFile) <> "" Then Range("D6").Activate With ActiveSheet.Pictures.Insert(cFile) b = Range("d6").Width / .Width .ShapeRange.ScaleWidth b, 0, 0 .ShapeRange.ScaleHeight b, 0, 0 .ShapeRange.IncrementTop (Range("d6").Height - .Height) / 2 End With End If Application.EnableEvents = True Application.ScreenUpdating = True End Sub
|