İyi Bayramlar, Excel sayfamı masaüstüne kayıt etmek istiyorum. Aşağıda bulunan kod çalışıyor yalnız beyaz bir sayfa olarak kayıt ediyor sebebi nedir?
Kod:
Sub foto()
Dim obce As Object
Dim caart As Chart
Dim jipeg As Range
masaustu = CreateObject("WScript.Shell").specialfolders("Desktop")
ad = "test"
For x = 1 To 20000
If Dir(masaustu & "\" & "ad" & x & ".jpg") = "" Then
Yol = masaustu & "\" & "ad" & x & ".jpg"
Exit For
End If
Next
Application.ScreenUpdating = False
Set jipeg = ActiveSheet.Range("A1:U23")
jipeg.Copy
Set obce = ActiveSheet.Shapes.AddShape(1, 1, 1, 1, 1)
obce.Select
ActiveSheet.Paste
obce.Delete
With Selection
.CopyPicture 1, 2
Set caart = ActiveSheet.ChartObjects.Add(1, 1, .Width, .Height).Chart
Range("a1").Select
With caart
.Paste
.Export Yol 'nereye çıkartılacaksa
.Parent.Delete
End With
.Delete
End With
Set jipeg = Nothing
Set obce = Nothing
End Sub