Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Me.Range("A2")) Is Nothing Then
Call CreateSheetNamesDropDown
End If
End Sub
Sub CreateSheetNamesDropDown()
Dim ws As Worksheet
Dim sheetList As String
Dim dropDownCell As Range
Set dropDownCell = ActiveSheet.Range("A2")
For Each ws In ThisWorkbook.Sheets
If ws.Name <> "Calculations" Then sheetList = sheetList & ws.Name & ","
Next ws
sheetList = Left(sheetList, Len(sheetList) - 1) ' Remove the trailing comma
' Apply Data Validation to the chosen cell with the sheet names
With dropDownCell.Validation
.Delete ' Remove any existing validation
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:=sheetList
End With
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Me.Range("A2")) Is Nothing Then
Call DisplayMessage
End If
End Sub
Sub DisplayMessage()
[B1] = Worksheets([A2].Value).[A1]
End Sub