Can we insert Custom Properties in the header in Excel

A

Aryan

Hello All,

I have been struggling through a problem from long time. Can we insert
Custom Properties in the header in Excel. If yes, how??? Is it possible

only through macros & not without that?? Can anybody get me the macro
code.


My main problem is, I want to insert the date through a field/Custom
Property in the Header so that user can easily go and change the date
just by updating the field as we do in MS WORD.


Plz somebody help. Its urgent.


Thanks,
Rudra
 
B

Bob Phillips

Yes, it needs code

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.LeftHeader = ActiveWorkbook.CustomDocumentProperties("myDate")
End With
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code



--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
A

Aryan

Hey.......thnk u very much Bob......dat code really worked.......thnx
very much once again
 

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