2008-09-30 23 views

回答

3

处理的Workbook_BeforePrint事件。

private sub Workbook_BeforePrint (cancel as boolean) 
    '//g_MyFlag is set when the user clicks you toolbar button. 
    '//It must get cleared in the end of your procedure. 
    if not g_MyFlag then cancel = true: exit sub 

end sub 

在MS Word中,也可以重新定义系统宏本身。你必须创建一个名为FilePrint()的宏,而Word会自己调用它。可惜你不能在Excel中做到这一点。

相关问题