Mike Hogan wrote...
Is there a worksheet function, or some other method, that will return
a reference to the active cell? By active cell, I mean the last cell
pointed to and clicked on. Thanks for any help.
The closest formula approach would be =CELL("Address"), but it won't
automatically recalc just by changing the active cell or current
selection. If you need to track the active cell automatically, you need
to use either a worksheet level SelectionChange event handler or a
workbook level SheetSelectionChange event handler. Event handlers are
special VBA macros that run when particular events occur.
Put the following code into the active worksheet's code (right click on
the worksheet's tab and select View Code to launch the VB Editor, and
paste the following into it)
'-- begin copy --
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
MsgBox Prompt:=Target.Address(0, 0), Title:="Active Cell"
End Sub
'-- end copy --
Switch back to Excel and select different cells in that worksheet.