For a while now, my colleagues and me have been using all kinds of methods to create a template to easily make volunteer vacancy forms.
Ideally, the person in charge of
EDIT: added a line to remove the border from around the chartobject
Sub Tester()
Dim sht as worksheet
Set sht = ThisWorkbook.Worksheets("Sheet1")
ExportRange sht.Range("B2:H8"), _
ThisWorkbook.Path & "\" & sht.Range("J3").Value
End Sub
Sub ExportRange(rng As Range, sPath As String)
Dim cob, sc
rng.CopyPicture Appearance:=xlScreen, Format:=xlPicture
Set cob = rng.Parent.ChartObjects.Add(10, 10, 200, 200)
'remove any series which may have been auto-added...
Set sc = cob.Chart.SeriesCollection
Do While sc.Count > 0
sc(1).Delete
Loop
With cob
.ShapeRange.Line.Visible = msoFalse '<<< remove chart border
.Height = rng.Height
.Width = rng.Width
.Chart.Paste
.Chart.Export Filename:=sPath, Filtername:="PNG"
.Delete
End With
End Sub