ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   HEADER WITH VARIABLES (https://www.excelbanter.com/excel-programming/378379-header-variables.html)

[email protected]

HEADER WITH VARIABLES
 
I need some help with a macro that will prompt for variables and place
that information in the header of my spreadsheet. On the left I need
to put the internal fiscal period on line one ( e.g. PERIOD 4 2007) and
then a division name on line two.

Thanks.


Ken

HEADER WITH VARIABLES
 
This should get you started:

Sub Macro1()

Period = InputBox("What Period?")
DivName = InputBox("What Division?")

With ActiveSheet.PageSetup
.LeftHeader = Period & Chr(10) & DivName
End With

End Sub

Good luck.

Ken
Norfolk, Va


wrote:
I need some help with a macro that will prompt for variables and place
that information in the header of my spreadsheet. On the left I need
to put the internal fiscal period on line one ( e.g. PERIOD 4 2007) and
then a division name on line two.

Thanks.




All times are GMT +1. The time now is 10:19 AM.

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