I think he wants to only run the code once on opening the workbook, so that is why I recommended storing a value in a cell.