Returning value of active cell
One way:
In your worksheet code module (right-click the worksheet tab and
choose View Code), enter
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
On Error Resume Next
Application.EnableEvents = False
Range("A1").Value = ActiveCell.Value
Application.EnableEvents = True
On Error GoTo 0
End Sub
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Address = ActiveCell.Address Then
On Error Resume Next
Application.EnableEvents = False
Range("A1").Value = ActiveCell.Value
Application.EnableEvents = True
On Error GoTo 0
End If
End Sub
In article . com,
"Sergio" wrote:
How do I get cell A1 to equal the value of whatever cell is active,
that I click on
|