Hi
I am creating a formal document (annual accounts) in Excel and while
working on the Excel file want the page footers to print but need to
be able to suppress the footers to show the draft pages as they will
look finally. I am doing this by printing the footer
€śwhite-on-white€ť. I then want to revert to having the original
footers by having black font in the footer.
So I will use code along the lines:
.LeftFooter = "&K00+000€ť&.LeftFooter
but need to be able to eliminate any previous €ś&K..€ť coding in the
original .LeftFooter, which Excel does automatically when changing
the code manually.
Can someone tell me how to eliminate programmatically any previous
font colour coding in the footer?
Many thanks
Tim
I'm not understanding your issue! Any 'new' settings made in .PageSetup
prior to Printout will persist until changed again. Perhaps all you
need to do is build a custom procedure that will 'toggle' this at
runtime...
Sub PrintDoc(Optional DraftMode As Boolean = False)
Dim sColor$
Const sWhite$ = "&K00+000": Const sBlack$ = "&K000000"
sColor = IIf(DraftMode, sWhite, sBlack)
With ActiveSheet.PageSetup
.LeftFooter = sColor & .LeftFooter
'and so on...
End With 'ActiveSheet
ActiveSheet.PrintOut
End Sub
...and use it like this...
Sub PrintFormalDoc()
PrintDoc
End Sub
Sub PrintDraftDoc()
PrintDoc True
End Sub
--
Garry
Free usenet access at
http://www.eternal-september.org
Classic
VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.
vb.general.discussion
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus