Auto notification

mchoud

New Member
Joined
Apr 17, 2002
Messages
42
I would like to give notification like header or footer only on the printout.

So in the real file there is no header or footer were set.

tks
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
You'll need to set them in a macro the runs before the workbook is printed. What do you want in the header?

Paddy
 
Upvote 0
I want give just a notification comment
Could you please give example of macro and including the way to runs that macro before printed

Tks

Kholid

On 2002-08-22 19:22, PaddyD wrote:
You'll need to set them in a macro the runs before the workbook is printed. What do you want in the header?

Paddy
 
Upvote 0
do you mean,

Private Sub Workbook_BeforePrint(Cancel As Boolean)
MsgBox "Check Header Or Footer!"
End Sub

Put that code in the ThisWorkbook modue in VBE

Brett
 
Upvote 0
Brett
Thanks about your quick response, but that is not my mean.
I mean, that i have a worksheet and there is no header or footer present at that. But i want there is automatic footnote every the worksheet is printed out.

tks
Mchoud

On 2002-08-22 20:37, brettvba wrote:
do you mean,

Private Sub Workbook_BeforePrint(Cancel As Boolean)
MsgBox "Check Header Or Footer!"
End Sub

Put that code in the ThisWorkbook modue in VBE

Brett
 
Upvote 0
what do you want in the footer?? You know you can set up footers using the edit | view header and footer option. see the help file for 'Create custom headers and footers'

Paddy
 
Upvote 0
ok this should do it for you change as needed

Private Sub Workbook_BeforePrint(Cancel As Boolean)

With ActiveSheet.PageSetup
.LeftHeader = "hi"
.LeftFooter = "bye"
End With
End Sub

Brett
 
Upvote 0

Forum statistics

Threads
1,214,793
Messages
6,121,617
Members
449,039
Latest member
Mbone Mathonsi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top