Track worksheet change event
Sub Worksheet_SelectionChange(ByVal Target As Range) Dim msgOutput As String msgOutput = "The name of this worksheet is " & Worlsheets(1).Name MsgBox (msgOutput) Worksheets(1).Select End Sub