aşağıdaki kod da resim dosya açılığ kapanınca siliniyor bunun silinmemesi için kodu nasıl yazmamız lazım
Private Sub CommandButton1_Click()
Dim sil As ChartObject
Call SendMessage(evn, CAP_EDIT_COPY, 0, 0)
evnresim = "C:\evnresim.jpg"
With ActiveSheet.ChartObjects.Add(0, 0, picCapture.Width, picCapture.Height).Chart
.Paste
.Export evnresim
For Each sil In ActiveSheet.ChartObjects
sil.Delete
Next sil
Image1.Picture = LoadPicture(evnresim)
Sayfa1.Range("d7").Copy
With Sayfa3
.Range("B65536").End(3)(2, 1).PasteSpecial xlPasteValues
.Range("C65536").End(3)(2, 1) = VBA.Now: .Select
ActiveSheet.Pictures.Insert(evnresim).Select
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Top = .Range("C65536").End(3).Top
Selection.ShapeRange.Left = .Range("d65536").End(3).Left
Selection.ShapeRange.Height = .Range("c65536").End(3).Height
Selection.ShapeRange.Width = .Range("d65536").End(3)(2, 1).Width
End With
Kill evnresim
End With
Application.CutCopyMode = False
End Sub
Private Sub CommandButton1_Click()
Dim sil As ChartObject
Call SendMessage(evn, CAP_EDIT_COPY, 0, 0)
evnresim = "C:\evnresim.jpg"
With ActiveSheet.ChartObjects.Add(0, 0, picCapture.Width, picCapture.Height).Chart
.Paste
.Export evnresim
For Each sil In ActiveSheet.ChartObjects
sil.Delete
Next sil
Image1.Picture = LoadPicture(evnresim)
Sayfa1.Range("d7").Copy
With Sayfa3
.Range("B65536").End(3)(2, 1).PasteSpecial xlPasteValues
.Range("C65536").End(3)(2, 1) = VBA.Now: .Select
ActiveSheet.Pictures.Insert(evnresim).Select
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Top = .Range("C65536").End(3).Top
Selection.ShapeRange.Left = .Range("d65536").End(3).Left
Selection.ShapeRange.Height = .Range("c65536").End(3).Height
Selection.ShapeRange.Width = .Range("d65536").End(3)(2, 1).Width
End With
Kill evnresim
End With
Application.CutCopyMode = False
End Sub
