Private Sub Worksheet_Activate()
Dim cht As ChartObject
Dim ActiveShape As Shape
Dim UserSelection As Variant
ActiveSheet.SetBackgroundPicture filename:=""
ActiveSheet.Shapes.AddShape(msoShapeRectangle, _
Range("A1").Top, _
Range("A1").Left, _
Range("A1:FR1").Width, _
Range("A1:A52").Height).Select
With Selection.ShapeRange
.Fill.Visible = msoTrue
.Fill.UserPicture "C:\Docs 2021\2021 Miscellaneous\resized.jpg"
.Line.Visible = msoFalse
End With
Set UserSelection = ActiveWindow.Selection
Set ActiveShape = ActiveSheet.Shapes(UserSelection.Name)
Set cht = ActiveSheet.ChartObjects.Add( _
Left:=ActiveCell.Left, _
Width:=ActiveShape.Width, _
Top:=ActiveCell.Top, _
Height:=ActiveShape.Height)
cht.ShapeRange.Fill.Visible = msoFalse
cht.ShapeRange.Line.Visible = msoFalse
ActiveShape.Copy
cht.Activate
ActiveChart.Paste
cht.Chart.Export "C:\Docs 2021\2021 Miscellaneous\resized.jpg"
cht.Delete
ActiveShape.Delete
ActiveSheet.SetBackgroundPicture filename:= _
"C:\Docs 2021\2021 Miscellaneous\resized.jpg"
End Sub