I had a thought...The user defined function was entered in the code for a specific sheet ( I also tried the entire workbook). Not gonna work.If the same code is inserted into a module, it works just fine. So, not surprisingly, it was user error.