Private Sub Chart_Deactivate() msg = "Thanks for viewing the chart." MsgBox msg, , ActiveWorkbook.Name End Sub