Chart Print Footer :: Excel 2007

Q

QB

I create a chart using vba and I create it on it own worksheet
(ActiveChart.Location Where:=xlLocationAsNewSheet, Name:="UsageChart"). I
need to setup the page footer so that when it prints, the date/time appear in
the lower right-hand corner.

I have tried using the following command to set it up:

Worksheets("UsageChart").PageSetup.RightFooter = Format(Date, "yyyy-mmm-dd")

but it does not work, nothing appears. What am I doing wrong?

Thank you for your help,

QB
 
G

Gord Dibben

Chart sheet is not a worksheet.

Sheets collection comprises worksheets and chartsheets.

This works for me.

Sheets("UsageChart").PageSetup.RightFooter = Format(Date, "yyyy-mmm-dd")


Gord Dibben MS Excel MVP
 
G

Gary Brown

Excel looks at Charts that are on their own tab differently from 'worksheets'
so you need slightly different syntax...

Charts("UsageChart").PageSetup.LeftFooter = "&D"

The formatting for date can not be done here. The '&D' takes it's format
from the default Date format on your computer.
 
G

Gary Brown

QB,
I want to appologize for my incorrect answer yesterday. Thank you, Gord
Dibben!!!!
Sincerely,
Gary Brown
 

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