set your worksheet to it's own window (the one between minimize and exit) then right click in the bar at the top of the column letters then choose view code, in the left drop down, change (general) to "workbook" and in the next drop down choose "open"
Place your code or, a sub/function name (to call),here.