[Solved] Excel macro to take a screenshot of specific cells and save as image file


This appears to work:

Sub Macro1()
    myFileName = "chrt.png"
    Range("G3:J14").Select
    Selection.CopyPicture Appearance:=xlScreen, Format:=xlPicture

    Charts.Add
    ActiveChart.Paste
    ActiveChart.Export Filename:=ThisWorkbook.Path & "\" & myFileName, Filtername:="PNG"
End Sub

But you may need to resize or edit the resulting picture to meet your needs. You also may want to delete the Chart when you are done.

4

solved Excel macro to take a screenshot of specific cells and save as image file