Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
mlh97
 
Posts: n/a
Default Excel footer reference to cell in workbook

I'm trying to have my Excel footer reference to a cell in the worksheet. Can
this be done? I saw where someone previously suggested something with VBE,
but 1) I know zero about VBE and 2) I tried it anyway and couldn't get it to
work.

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Tom Ogilvy
 
Posts: n/a
Default Excel footer reference to cell in workbook

You can't do it with any setting provided by excel.

You can use the BeforePrint event to execute code that updates the footer
with information from the cell. This code would need to go in the
ThisWorkbook module.

To get to that you go to the vbe (Alt+F11)

then in the project explorer window you will see your workbook listed.
underneath it look for an entry for

ThisWorkbook

double click on that

At the top of the resulting module
In the left dropdown, select Workbook
In the right dropdown select BeforePrint

this will place an Event subroutine declaration in the module

Private Sub Workbook_BeforePrint(Cancel As Boolean)

End Sub

Within this routine you can place the code to update the footer

Private Sub Workbook_BeforePrint(Cancel As Boolean)
for each sh in Activewindow.SelectedSheets
if sh.Name = "Sheet3" then
sh.PageSetup.LeftFooter = Worksheets("Sheet3") _
.Range("B9").Text
Exit for
end if
Next
End Sub


--
Regards,
Tom Ogilvy





"mlh97" wrote in message
...
I'm trying to have my Excel footer reference to a cell in the worksheet.

Can
this be done? I saw where someone previously suggested something with VBE,
but 1) I know zero about VBE and 2) I tried it anyway and couldn't get it

to
work.

Thanks.



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
Excel: can I refer to cell reference in page setup header nikos Excel Worksheet Functions 0 February 21st 06 06:23 PM
Pasting Word table cell with paragraph markers into single Excel c Steve Excel Discussion (Misc queries) 1 June 16th 05 11:26 PM
How do I reference every "n" cell in a column in Excel? Alma Excel Worksheet Functions 2 March 22nd 05 06:19 PM
Can you reference cell values in Headers and Footers in Excel 200. jkyte Excel Discussion (Misc queries) 2 December 30th 04 09:05 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 02:20 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"