perhaps something like this
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("b5")) Is Nothing Then
Application.DisplayAlerts = 0
Dim oRange As Range
Dim oCht As Chart
Dim oImg As Picture
Set oRange = Range("a1:k171")
Set oCht = Charts.Add
oRange.CopyPicture xlScreen, xlPicture
oCht.Paste
oCht.Name = ActiveSheet.Name
oCht.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
ThisWorkbook.Path & "\" & Sheet2.Name & ".pdf", _
Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
oCht.Delete
Application.DisplayAlerts = 1
End If
End Sub
and welcome to the forum!
Bookmarks