Printing Footer

  • Thread starter Thread starter Wahab
  • Start date Start date
W

Wahab

Hi
I have created one Excel file, I wnat to take credit for
that one. What I want is I want to write code in VBA in
such a way that, somebody print any sheet or any part
form this file in the footer my name will come. If some
one is adding the sheet or changing the name of sheet
still it will print my name in footer.

Thanks to all in advance
Wahab
 
Hi Wahab

Place the following code in the "ThisWorkbook" module.

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim ws As Worksheet
For Each ws In Worksheets
ws.PageSetup.CenterFooter = "File Created by Wahab"
Next ws
End Sub

--
XL2002
Regards

William

(e-mail address removed)

| Hi
| I have created one Excel file, I wnat to take credit for
| that one. What I want is I want to write code in VBA in
| such a way that, somebody print any sheet or any part
| form this file in the footer my name will come. If some
| one is adding the sheet or changing the name of sheet
| still it will print my name in footer.
|
| Thanks to all in advance
| Wahab
|
 
-----Original Message-----
Hi Wahab

Place the following code in the "ThisWorkbook" module.

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim ws As Worksheet
For Each ws In Worksheets
ws.PageSetup.CenterFooter = "File Created by Wahab"
Next ws
End Sub

--
XL2002
Regards

William

(e-mail address removed)

| Hi
| I have created one Excel file, I wnat to take credit for
| that one. What I want is I want to write code in VBA in
| such a way that, somebody print any sheet or any part
| form this file in the footer my name will come. If some
| one is adding the sheet or changing the name of sheet
| still it will print my name in footer.
|
| Thanks to all in advance
| Wahab
|


.
It's well done,Thank you very much.
Wahab
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top