Header & Footer from vb6

G

Ger

Hi

Can anyone tell me how to create a header and a footer in excel from a
vb project. I can create the workbook and add text etc to the sheets
but i dont know how to create a header & footer.

Please help

Thanks
 
G

Guest

ActiveSheet.PageSetup.CenterHeader = "yourCheader"
ActiveSheet.PageSetup.RightHeader = "yourRheader"
ActiveSheet.PageSetup.CenterFooter = "yourCfooter"
etc...

Regards,
Stefi

„Ger†ezt írta:
 
N

NickHK

You can always record a macro in Excel for the actions you are unsure of.
Not the most efficient code, but it will give you the necessary objects,
methods, properties etc.

Conversion to VB5/6 acceptable code should be pretty straight forward.

NickHK
 

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