Did the function call get copied from the actual macro?if so "WroksheetFunction...." should actually be"WorksheetFunction..."