I have a Macro that works brilliantly to export from Excel to .jpg but I have 2 questions:
1. Does anyone know what I can add to allow me to chose where the .jpg file saves? At the moment it saves to my computers default location.
2. Is there a way of making the exported .jpg higher quality?
Here is the code I currently use:
Sub ExportLeagueTable()
Dim oWs As Worksheet
Dim oRng As Range
Dim oChrtO As ChartObject
Dim lWidth As Long, lHeight As Long
Set oWs = ActiveSheet
Set oRng = oWs.Range("A1:P26")
oRng.CopyPicture xlScreen, xlPicture
lWidth = oRng.Width
lHeight = oRng.Height
Set oChrtO = oWs.ChartObjects.Add(Left:=0, Top:=0, Width:=lWidth, Height:=lHeight)
oChrtO.Activate
With oChrtO.Chart
.Paste
.Export Filename:="NBL League Table 18.jpg", Filtername:="JPG"
End With
oChrtO.Delete
End Sub
Thanks
Bookmarks