Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Temporarily Suppressing the Printing of Page Footers

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Temporarily Suppressing the Printing of Page Footers

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Temporarily Suppressing the Printing of Page Footers

On 10-Jun-16 3:57 PM, Tim Childs wrote:
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


Hi Garry

Thanks v much for response. The issue was the way I was embedding the
colour constants into the footer whereas you have shown me a way that
enables me to avoid doing this.

I will incorporate it into my print procedure.

Best wishes

Tim
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default Temporarily Suppressing the Printing of Page Footers

On 10-Jun-16 3:57 PM, Tim Childs wrote:
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


Hi Garry

Thanks v much for response. The issue was the way I was embedding the
colour constants into the footer whereas you have shown me a way that
enables me to avoid doing this.

I will incorporate it into my print procedure.

Best wishes

Tim


Thanks for the feedback...

--
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing odd and even page footers ULandreman Excel Programming 4 March 24th 09 07:57 PM
Printing odd and even page footers ULandreman Excel Programming 0 March 24th 09 04:45 PM
Printing Headers on only first page and Footers on only last page JacMar Excel Discussion (Misc queries) 5 January 21st 07 03:48 PM
Hide individual/range cells and temporarily increase scale for printing chris100[_2_] Excel Programming 3 July 17th 05 08:54 PM
Suppressing or turning off the Printing dialog Jeff Lefebvre Excel Programming 4 February 8th 05 11:17 PM


All times are GMT +1. The time now is 01:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"