Hi Guys,

I am using the code below to change a export a data range as an image however it is too big and i need to resize it to shrink it down abit to fit into my GUI properly. - Is there a way to resize the image either after or before exporting?

Sub CopyRangeToPNG()
' save a range from Excel as a picture
Worksheets("Scorecard").Select
Dim rng As Excel.Range
Dim cht As Excel.ChartObject
 
Const strPath As String = "\\fbnecl3\inzb\Documents\Load Support\Tom\Projects\Dashboard\Charts\"
 
Application.ScreenUpdating = False
 
Set rng = Range("A1:Z23")
 
rng.CopyPicture xlScreen, xlPicture
 
Set cht = ActiveSheet.ChartObjects.Add(0, 0, rng.Width, rng.Height)
 
cht.Chart.Paste
 
cht.Chart.Export strPath & "loadscorecard.png"
 
cht.Delete
 
ExitProc:
Application.ScreenUpdating = True
Set cht = Nothing
Set rng = Nothing
 End Sub