- Katılım
- 26 Aralık 2019
- Mesajlar
- 4
- Excel Vers. ve Dili
- 2016 english / turkish/ dutch
Excel calisma sayfasinin A1-Z100 hucreleri arasinin ekran resmini alip istenilen klasore jpg olarak yapistirmak istiyorum fakat resim tamamen beyaz olarak bos kaydediliyor. Sorunun cozumu sizce ne olabilir?
Sub SaveScreenshotAsJPG()
'Get the current active sheet
Dim mySheet As Worksheet
Set mySheet = ActiveSheet
'Take a screenshot of the worksheet
mySheet.Range("A1:Z100").CopyPicture
'Create a new chart
Dim myChart As Chart
Set myChart = mySheet.ChartObjects.Add(0, 0, mySheet.Range("A1:Z100").Width, mySheet.Range("A1:Z100").Height).Chart
'Paste the screenshot into the chart
myChart.Paste
'Save the chart as JPG
myChart.Export "U:\Services_Zuid\Screenshot.jpg", "JPG"
'Delete the chart
myChart.Parent.Delete
End Sub
Sub SaveScreenshotAsJPG()
'Get the current active sheet
Dim mySheet As Worksheet
Set mySheet = ActiveSheet
'Take a screenshot of the worksheet
mySheet.Range("A1:Z100").CopyPicture
'Create a new chart
Dim myChart As Chart
Set myChart = mySheet.ChartObjects.Add(0, 0, mySheet.Range("A1:Z100").Width, mySheet.Range("A1:Z100").Height).Chart
'Paste the screenshot into the chart
myChart.Paste
'Save the chart as JPG
myChart.Export "U:\Services_Zuid\Screenshot.jpg", "JPG"
'Delete the chart
myChart.Parent.Delete
End Sub