Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
This was a feature in 123 where header or footer information could be
retrieved from a cell in the worksheet. Is there anything similar in Excel? |
#2
![]() |
|||
|
|||
![]()
You could use a macro...
For instance, this code goes behind the ThisWorkbook module: Option Explicit Private Sub Workbook_BeforePrint(Cancel As Boolean) With Worksheets("sheet1") .PageSetup.LeftHeader = .Range("a1").Text End With End Sub Texas_Toast wrote: This was a feature in 123 where header or footer information could be retrieved from a cell in the worksheet. Is there anything similar in Excel? -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I'm trying to enter this marco, and need some clarification as I am having
some trouble with with macro. With Worksheets("sheet 1"), sheet 1 would be the worksheet that contains the information, and the range "a1" is the cell, correct? My worksheet name is Expense Worksheet. Do I need to change the worksheet name to Expense_Worksheet? I would like the text in cell a1, which is my e7, to be in the header on all 7 of my worksheets - is this possible? I hope this makes sense. Thanks for your help. -pam "Dave Peterson" wrote: You could use a macro... For instance, this code goes behind the ThisWorkbook module: Option Explicit Private Sub Workbook_BeforePrint(Cancel As Boolean) With Worksheets("sheet1") .PageSetup.LeftHeader = .Range("a1").Text End With End Sub Texas_Toast wrote: This was a feature in 123 where header or footer information could be retrieved from a cell in the worksheet. Is there anything similar in Excel? -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You would change this:
With Worksheets("sheet1") to With Worksheets("Expense Worksheet") (It has to match exactly.) (It really is named "expense worksheet"??) Pam in California wrote: I'm trying to enter this marco, and need some clarification as I am having some trouble with with macro. With Worksheets("sheet 1"), sheet 1 would be the worksheet that contains the information, and the range "a1" is the cell, correct? My worksheet name is Expense Worksheet. Do I need to change the worksheet name to Expense_Worksheet? I would like the text in cell a1, which is my e7, to be in the header on all 7 of my worksheets - is this possible? I hope this makes sense. Thanks for your help. -pam "Dave Peterson" wrote: You could use a macro... For instance, this code goes behind the ThisWorkbook module: Option Explicit Private Sub Workbook_BeforePrint(Cancel As Boolean) With Worksheets("sheet1") .PageSetup.LeftHeader = .Range("a1").Text End With End Sub Texas_Toast wrote: This was a feature in 123 where header or footer information could be retrieved from a cell in the worksheet. Is there anything similar in Excel? -- Dave Peterson -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
So my macro would look like this:
Option Explicit Private Sub Workbook_BeforePrint(Cancel As Boolean) With Worksheets ("Expense_Worksheet") .PageSetup.LeftHeader = .Range("e7").Text End With End Sub Sorry to be dense on this. The header isn't pulling the information from e7 so I think I haven't done this properly. -pam "Dave Peterson" wrote: You would change this: With Worksheets("sheet1") to With Worksheets("Expense Worksheet") (It has to match exactly.) (It really is named "expense worksheet"??) Pam in California wrote: I'm trying to enter this marco, and need some clarification as I am having some trouble with with macro. With Worksheets("sheet 1"), sheet 1 would be the worksheet that contains the information, and the range "a1" is the cell, correct? My worksheet name is Expense Worksheet. Do I need to change the worksheet name to Expense_Worksheet? I would like the text in cell a1, which is my e7, to be in the header on all 7 of my worksheets - is this possible? I hope this makes sense. Thanks for your help. -pam "Dave Peterson" wrote: You could use a macro... For instance, this code goes behind the ThisWorkbook module: Option Explicit Private Sub Workbook_BeforePrint(Cancel As Boolean) With Worksheets("sheet1") .PageSetup.LeftHeader = .Range("a1").Text End With End Sub Texas_Toast wrote: This was a feature in 123 where header or footer information could be retrieved from a cell in the worksheet. Is there anything similar in Excel? -- Dave Peterson -- Dave Peterson |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Does that worksheet name have a space between words or an underscore?
Expense_Worksheet or Expense Worksheet You have to match it exactly the way you see it on the tab itself. Pam in California wrote: So my macro would look like this: Option Explicit Private Sub Workbook_BeforePrint(Cancel As Boolean) With Worksheets ("Expense_Worksheet") .PageSetup.LeftHeader = .Range("e7").Text End With End Sub Sorry to be dense on this. The header isn't pulling the information from e7 so I think I haven't done this properly. -pam "Dave Peterson" wrote: You would change this: With Worksheets("sheet1") to With Worksheets("Expense Worksheet") (It has to match exactly.) (It really is named "expense worksheet"??) Pam in California wrote: I'm trying to enter this marco, and need some clarification as I am having some trouble with with macro. With Worksheets("sheet 1"), sheet 1 would be the worksheet that contains the information, and the range "a1" is the cell, correct? My worksheet name is Expense Worksheet. Do I need to change the worksheet name to Expense_Worksheet? I would like the text in cell a1, which is my e7, to be in the header on all 7 of my worksheets - is this possible? I hope this makes sense. Thanks for your help. -pam "Dave Peterson" wrote: You could use a macro... For instance, this code goes behind the ThisWorkbook module: Option Explicit Private Sub Workbook_BeforePrint(Cancel As Boolean) With Worksheets("sheet1") .PageSetup.LeftHeader = .Range("a1").Text End With End Sub Texas_Toast wrote: This was a feature in 123 where header or footer information could be retrieved from a cell in the worksheet. Is there anything similar in Excel? -- Dave Peterson -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
In Cell Validation List & Linked Cell VLOOKUP | Excel Discussion (Misc queries) | |||
Why does Custom Format not control Cell Display? | Excel Discussion (Misc queries) | |||
How do I format a cell for a custom part number? | Excel Discussion (Misc queries) | |||
Copying linked cell references. | Excel Worksheet Functions | |||
Date on two lines using a custom cell format possible? | Excel Discussion (Misc queries) |