I'm suggesting that it sets options local to 'UDF_SetOptions' not local to 'PadStr' & I'm also suggesting this might be the appropriate action.
_________________________
Jack