Excel Header and Footer variables

R

Raymond Chiu

Dear all,

Can the excel page header or page footer have the variables which will be
assigned by vb.net program at run time??
How to set variables in page header or page footer? How to reference the
page header or page footer variables?

Thanks for your help,

Raymond
 
S

ShaneDevenshire

Hi Raymond,

You need to use VBA to do this. In the VBE you double click the
thisWorkbook object in the Project Explorer and choose Workbook from the
Object box and BeforePrint from the Procedures box and then write the
necessary code to do what you need.

Private Sub Workbook_BeforePrint(Cancel As Boolean)
'my code here
End Sub
 

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