Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Matthew
 
Posts: n/a
Default Link page header with cell contents

Is there a way to link the contents of a cell with the page header so that it
can change automatically when the cell changes. Also this would allow us to
change one cell and then link it to the header on several pages.

Thank you.
--
Respectfully
Matthew Russell
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

Instead of changing the header each time the cell changes, you could change the
header when you do a print (or printpreview).

Kind of like:

Option Explicit
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With Worksheets("sheet1")
.PageSetup.LeftFooter = .range("a1").value
End With
End Sub


This goes into the ThisWorkbook module.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Matthew wrote:

Is there a way to link the contents of a cell with the page header so that it
can change automatically when the cell changes. Also this would allow us to
change one cell and then link it to the header on several pages.

Thank you.
--
Respectfully
Matthew Russell


--

Dave Peterson
  #3   Report Post  
Matthew
 
Posts: n/a
Default

Thank you Dave... that's a great idea. I feel stupid in that it seems so
simple and obvious, I should have realized it sooner. But sometimes writing
code all day, I lose track of the simplest answers expecting it to be
something much more complex than it really is.

Thanks again.

"Dave Peterson" wrote:

Instead of changing the header each time the cell changes, you could change the
header when you do a print (or printpreview).

Kind of like:

Option Explicit
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With Worksheets("sheet1")
.PageSetup.LeftFooter = .range("a1").value
End With
End Sub


This goes into the ThisWorkbook module.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Matthew wrote:

Is there a way to link the contents of a cell with the page header so that it
can change automatically when the cell changes. Also this would allow us to
change one cell and then link it to the header on several pages.

Thank you.
--
Respectfully
Matthew Russell


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jim Jim is offline
external usenet poster
 
Posts: 615
Default Link page header with cell contents

Is there a way to do this without using a macro?


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Link page header with cell contents

Dave,
can you also code font and font size into this program?
Thanks Bob

"Dave Peterson" wrote:

Instead of changing the header each time the cell changes, you could change the
header when you do a print (or printpreview).

Kind of like:

Option Explicit
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With Worksheets("sheet1")
.PageSetup.LeftFooter = .range("a1").value
End With
End Sub


This goes into the ThisWorkbook module.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Matthew wrote:

Is there a way to link the contents of a cell with the page header so that it
can change automatically when the cell changes. Also this would allow us to
change one cell and then link it to the header on several pages.

Thank you.
--
Respectfully
Matthew Russell


--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Link page header with cell contents

..PageSetup.LeftFooter = "&""Algerian,Regular""&16" & Range("A1").Value


Gord Dibben MS Excel MVP

On Thu, 15 Feb 2007 18:08:18 -0800, RCDWESTFIELD
wrote:

Dave,
can you also code font and font size into this program?
Thanks Bob

"Dave Peterson" wrote:

Instead of changing the header each time the cell changes, you could change the
header when you do a print (or printpreview).

Kind of like:

Option Explicit
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With Worksheets("sheet1")
.PageSetup.LeftFooter = .range("a1").value
End With
End Sub


This goes into the ThisWorkbook module.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Matthew wrote:

Is there a way to link the contents of a cell with the page header so that it
can change automatically when the cell changes. Also this would allow us to
change one cell and then link it to the header on several pages.

Thank you.
--
Respectfully
Matthew Russell


--

Dave Peterson


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Link page header with cell contents

Expanding on this topic.

I'm using concantenate to set up the Header I want to use. Example would be
'April Year to Date" How can i turn this into a two line header?
Specifically..

April
Year to Date

The code is retrieving data from one cell. I thought about setting up the
data on two cells but i still can't figure out how to set up two lines in the
header.

Bryan

"Gord Dibben" wrote:

..PageSetup.LeftFooter = "&""Algerian,Regular""&16" & Range("A1").Value


Gord Dibben MS Excel MVP

On Thu, 15 Feb 2007 18:08:18 -0800, RCDWESTFIELD
wrote:

Dave,
can you also code font and font size into this program?
Thanks Bob

"Dave Peterson" wrote:

Instead of changing the header each time the cell changes, you could change the
header when you do a print (or printpreview).

Kind of like:

Option Explicit
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With Worksheets("sheet1")
.PageSetup.LeftFooter = .range("a1").value
End With
End Sub


This goes into the ThisWorkbook module.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Matthew wrote:

Is there a way to link the contents of a cell with the page header so that it
can change automatically when the cell changes. Also this would allow us to
change one cell and then link it to the header on several pages.

Thank you.
--
Respectfully
Matthew Russell

--

Dave Peterson



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Link page header with cell contents

"April Year" & vblf & "to Date"



Bryan W.H. wrote:

Expanding on this topic.

I'm using concantenate to set up the Header I want to use. Example would be
'April Year to Date" How can i turn this into a two line header?
Specifically..

April
Year to Date

The code is retrieving data from one cell. I thought about setting up the
data on two cells but i still can't figure out how to set up two lines in the
header.

Bryan

"Gord Dibben" wrote:

..PageSetup.LeftFooter = "&""Algerian,Regular""&16" & Range("A1").Value


Gord Dibben MS Excel MVP

On Thu, 15 Feb 2007 18:08:18 -0800, RCDWESTFIELD
wrote:

Dave,
can you also code font and font size into this program?
Thanks Bob

"Dave Peterson" wrote:

Instead of changing the header each time the cell changes, you could change the
header when you do a print (or printpreview).

Kind of like:

Option Explicit
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With Worksheets("sheet1")
.PageSetup.LeftFooter = .range("a1").value
End With
End Sub


This goes into the ThisWorkbook module.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Matthew wrote:

Is there a way to link the contents of a cell with the page header so that it
can change automatically when the cell changes. Also this would allow us to
change one cell and then link it to the header on several pages.

Thank you.
--
Respectfully
Matthew Russell

--

Dave Peterson




--

Dave Peterson
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Link page header with cell contents

Bryan

I would do the concatenation in the header.

With April in A1 and Year to Date in A2

Sub foo()
With ActiveSheet
..PageSetup.LeftHeader = Range("A1").Value & vbLf & Range("A2").Value
End With
End Sub


Gord



On Tue, 1 May 2007 03:42:01 -0700, Bryan W.H.
wrote:

Expanding on this topic.

I'm using concantenate to set up the Header I want to use. Example would be
'April Year to Date" How can i turn this into a two line header?
Specifically..

April
Year to Date

The code is retrieving data from one cell. I thought about setting up the
data on two cells but i still can't figure out how to set up two lines in the
header.

Bryan

"Gord Dibben" wrote:

..PageSetup.LeftFooter = "&""Algerian,Regular""&16" & Range("A1").Value


Gord Dibben MS Excel MVP

On Thu, 15 Feb 2007 18:08:18 -0800, RCDWESTFIELD
wrote:

Dave,
can you also code font and font size into this program?
Thanks Bob

"Dave Peterson" wrote:

Instead of changing the header each time the cell changes, you could change the
header when you do a print (or printpreview).

Kind of like:

Option Explicit
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With Worksheets("sheet1")
.PageSetup.LeftFooter = .range("a1").value
End With
End Sub


This goes into the ThisWorkbook module.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Matthew wrote:

Is there a way to link the contents of a cell with the page header so that it
can change automatically when the cell changes. Also this would allow us to
change one cell and then link it to the header on several pages.

Thank you.
--
Respectfully
Matthew Russell

--

Dave Peterson




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I link many cells to one particular cell? fish@divi Excel Discussion (Misc queries) 2 January 4th 05 11:00 PM
How do I link many cells to one particular cell? justinfishman22 Excel Discussion (Misc queries) 2 January 4th 05 12:09 AM
How do Icreate link from page of contents to sheets in workbook? alaskapaf Excel Discussion (Misc queries) 1 December 6th 04 06:15 PM
Same Cell Header For Every Page localhost Excel Discussion (Misc queries) 1 November 26th 04 02:40 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 09:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"