Can I put something in the footer that reads from the sheet

M

Michelle

Hello, I want the footer in my print-out to pull some information from my
workbook (ideally from a different sheet)

Is this possible?

Thanks

M
 
J

Jacob Skaria

Hi Michelle

You will have to make use of the workbook event...

Set the security level to low/medium in (Tools|Macro|Security). From
workbook press Alt+F11 to launch VBE (Visual Basic Editor). From the left
treeview search for the workbook name and click on + to expand it. Within
that you should see the following

VBAProject(Your_Filename)
Microsoft Excel Objects
Sheet1(Sheet1)
Sheet2(Sheet2)
Sheet3(Sheet3)
This Workbook

Double click 'This WorkBook' and paste the below code to the right code pane.

'Edit sheetname
Private Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveSheet.PageSetup.LeftFooter = Sheets("Sheetname").Range("A1").Value
End Sub
 
M

Michelle

With hindsight, I realise I shouldn't have posted to the VBA group.

What I really want is a field that I can put into the footer that will just
read from a cell.

something like: &[=sheet1!A1]

is there any such thing?

Cheers

M
 
J

Jacob Skaria

Sorry.. not possible other than a VBA solution.

--
Jacob (MVP - Excel)


Michelle said:
With hindsight, I realise I shouldn't have posted to the VBA group.

What I really want is a field that I can put into the footer that will just
read from a cell.

something like: &[=sheet1!A1]

is there any such thing?

Cheers

M
 
M

Michelle

Thanks Jacob.

M


Jacob Skaria said:
Sorry.. not possible other than a VBA solution.

--
Jacob (MVP - Excel)


Michelle said:
With hindsight, I realise I shouldn't have posted to the VBA group.

What I really want is a field that I can put into the footer that will
just
read from a cell.

something like: &[=sheet1!A1]

is there any such thing?

Cheers

M


Jacob Skaria said:
Hi Michelle

You will have to make use of the workbook event...

Set the security level to low/medium in (Tools|Macro|Security). From
workbook press Alt+F11 to launch VBE (Visual Basic Editor). From the
left
treeview search for the workbook name and click on + to expand it.
Within
that you should see the following

VBAProject(Your_Filename)
Microsoft Excel Objects
Sheet1(Sheet1)
Sheet2(Sheet2)
Sheet3(Sheet3)
This Workbook

Double click 'This WorkBook' and paste the below code to the right code
pane.

'Edit sheetname
Private Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveSheet.PageSetup.LeftFooter =
Sheets("Sheetname").Range("A1").Value
End Sub


--
Jacob (MVP - Excel)


:

Hello, I want the footer in my print-out to pull some information from
my
workbook (ideally from a different sheet)

Is this possible?

Thanks

M
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top