ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to place values in custom header (https://www.excelbanter.com/excel-programming/326680-how-place-values-custom-header.html)

Thomas Grassi

how to place values in custom header
 
Can you place a value in the customer header?

I would like to put the day of the week on the header

Monday Tuesday etc.

Also any way to ask for input into the header?

Example

Name of: __________

Would like to have the ________ be entered if possible?

thanks

Tom



Shailesh Shah[_2_]

how to place values in custom header
 
Hi Tom,
Try this,

Sub test()
Dim vDay As String
vDay = InputBox("Enter name", "Header Setup")
If vDay < "" Then
With ActiveSheet.PageSetup
.LeftHeader = vDay
.CenterHeader = ""'modify to suit
.RightHeader = ""'modifiy to suit
End With
End If
End Sub

Regards,
Shah Shailesh
http://members.lycos.co.uk/shahweb/
(Excel Add-ins)

*** Sent via Developersdex http://www.developersdex.com ***

KeyWest JetSki

how to place values in custom header
 
Thanks

The only question I have is where do I place this code?

Tom

"Shailesh Shah" wrote in message
...
Hi Tom,
Try this,

Sub test()
Dim vDay As String
vDay = InputBox("Enter name", "Header Setup")
If vDay < "" Then
With ActiveSheet.PageSetup
.LeftHeader = vDay
.CenterHeader = ""'modify to suit
.RightHeader = ""'modifiy to suit
End With
End If
End Sub

Regards,
Shah Shailesh
http://members.lycos.co.uk/shahweb/
(Excel Add-ins)

*** Sent via Developersdex http://www.developersdex.com ***





All times are GMT +1. The time now is 01:25 PM.

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