title: Bring up user form when clicking on cell
body: <p>I have a spreadsheet with a list of people in the first column and various bits of information about them in the rest of each row. I have a userform which will populate and subsequently edit each record, which I want to have pop up when the user clicks on the person's name.</p>
  
  <p>e.g.:</p>
  
  <pre><code>Name        Age    DOB        Postcode
  John Smith  55     3/6/1958   RM3 5WO
  Mary Jones  22     4/2/1991   RM2 6TP
  </code></pre>
  
  <p>So I want to be able to click on John Smith (A2) to bring up a form with fields for his age, DOB, postcode etc. I also want to be able to use the form to add entries, so it will also function on at least one row below the list.</p>
  
  <p>I've been given the following code to use:</p>
  
  <pre><code>Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  
      If Target.Address = "$A$2" Then
          frm_tch_staffinfo.Show
      End If
  
  End Sub
  </code></pre>
  
  <p>I've tried using this in the sheet, but it doesn't seem to be working - nothing happens when I click on A2. Is there some error in the code or how I've implemented it? (I've put it in the code for the relevant sheet).</p>
  
  <p>Additionally, I want to expand the target address to include the range of all the names (the number of which may change) and at least one cell below (but not the header in A1). Is it possible to define such a range? Either simply selecting A2 and below, or using a process which counts the cells which are full and adds on or more at the end.</p>
  
  <p>Thanks for your help!</p>
  
  <p>ETA:<br>
  I definitely require Excel for this, as my usage is that of a spreadsheet rather than a database. This was a simplified example: the data is in fact all numeric and used in relatively complex calculations in other worksheets.</p>