Home » questions » Before and Befoe close macros for excel... why doesnt this work?

Before and Befoe close macros for excel... why doesnt this work?

2006-08-04 14:41:15, Category: Programming & Design
Private Sub Workbook_BeforePrint() MsgBox "PDF File before Print! Printer Name: Adobe PDF", vbExclamation End Sub Sub Workbook_BeforeClose() MsgBox "Sensitive INTERNAL Information MUST be hidden!", vbExclamation End Sub

Answers

  1. Dilip Rao

    On 2006-08-05 00:40:14


    You forgot to add parentheses Private Sub Workbook_BeforePrint(Cancel As Boolean) MsgBox ("Write whatever you want here to appear as prompt") End Sub Sub Workbook_BeforeClose() MsgBox ("Sensitive INTERNAL Information MUST be hidden!") End Sub