Hi blackhornet,
Thanks for the reply.
OK.. I've right clicked on the layout, selected Insert New Object, selected 'Function' and a new Object type appears in the Project list called 'Function'.
How do I add the code to the Function?
I would expect that I could right click on the Event sheet and select 'Add function' and type it in, but this isn't an option.
Regards, John