Steve,
By adding code to a worksheet, do you mean a worksheet event macro? If so, then you add the code by double-clicking the worksheet object in the Visual Basic Editor. For example, on the left side of the VBE you should see the Project Explorer window which shows you all workbooks and add-ins you currently have open. If you double-click on
VBAProject(Book1.xls), for example, you will see a folder named Microsoft Excel Objects and in this folder you should see all the worksheet objects for that workbook. If you double-click on one of these sheet objects you should see a blank white space. Then if you click on the drop-down menu that says (General) and change that to Worksheet, you should see the Worksheet_SelectionChange event displayed. Then click on the drop-down that says SelectionChange and you will see all the worksheet events that you can add code to and that will be executed when that event occurs.
HTH