View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\)[_1364_] Rick Rothstein \(MVP - VB\)[_1364_] is offline
external usenet poster
 
Posts: 1
Default want cell J1 to reflect the location of acitivecell.value

It is not a macro... it is a worksheet event procedure. Every time a new
cell becomes active, the code will "do its thing", automatically. The
procedure should be placed in the worksheet's code window, NOT in a Module
nor in a UserForm.

Rick


"Gordy99" wrote in message
...
This is the code I put in:
Private Sub worksheet_selectionchange(ByVal target As Range)

Range("j1").Value = Cells(ActiveCell.Row, 1).Value
End Sub

Can't find it on the macro list and I don't see it running.
Gordy


"Rick Rothstein (MVP - VB)" wrote:

I think this worksheet code does what you want...

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Range("J1").Value = Cells(ActiveCell.Row, 1).Value
End Sub

Rick


"Gordy99" wrote in message
...
would like cell J1 to reflect the row the activecell is in with the
value
of
column A.