Hey Steve - good job on finding Code Tags.
Here is the answer for your question.
Code behind an individual worksheet is called Event Code. This code can be triggered to run, depending on the event that is being performed on that sheet. In the IDE/VBA editor you need to double click on the Sheet Name in the VBA Project window. This will then show a blank VBA screen. At the top where it says "(General)" , click this dropdown and select "WorkSheet". Now the dropdown to the right lists all the possibe events that can be triggered on this sheet. Drop down this list and select "BeforeDoubleClick". This will now, in the VBA code, give you a Private Sub that will be triggered by a double click anywhere on the worksheet.
You want to only do your code if you double click on a cell between A2 and A500. To do this you need this code:
Target is the cell you clicked on and it is checked against A2 to A500. If the Target is in this range, you do the code. If it isn't in this range it will do nothing.
Read
http://www.cpearson.com/excel/Events.aspx for a good introduction to Event code.
I hope this helps.
Bookmarks