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
On Tue, 16 Mar 2010 12:08:01 -0700, QB <(E-Mail Removed)> wrote:
>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
|