macro registered by oncompile event