ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Printing Footer (https://www.excelbanter.com/excel-programming/303298-printing-footer.html)

Wahab

Printing Footer
 
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


William[_2_]

Printing Footer
 
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



"Wahab" wrote in message
...
| 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
|



No Name

Printing Footer
 

-----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



"Wahab" wrote in

message
...
| 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


All times are GMT +1. The time now is 06:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com