phantom headers

D

dave

I have a header which keeps coming back after I remove it
in the print preview window. Does anyone know why this
might be happening?

tia,
Dave
 
D

Dave Peterson

If you open the workbook with macros disabled, does the header still come back?

If it doesn't come back, it sounds like you have a macro that runs right before
you print.

Take a look under ThisWorkbook to see if you have any code in the
workbook_beforePrint procedure.
 
G

Gord Dibben

Dave

How do you remove it in the Print Preview Window?

You must select "Setup" from the PP window to access the Headers/Footers
dialog.

Remove from there.

If keeps coming back, maybe you have some code that is replacing it.

Like Before_Print code in the ThisWorkbook module.


Gord Dibben Excel MVP
 
G

Guest

The before workbook was exactly right. I think I recall someone at our
offices setting this up for all workbooks - but most other ones no longer
have it... this must have lingered for some reason. How could I confirm that
no other spreadsheets have lingered with thee headers? Is there a location
in office settings which could affect all workbooks? Also, I should simply
remove the code in this one right?

thanks to both of you,
Dave
 
D

Dave Peterson

I think you'll find the best approach is to just go and look (or wait until
someone complains and fix it then).

And if you're prompted with "this workbook contains macros" and you think you
removed all the code (in all the modules), take a look at Debra Dalgleish's
site:

http://www.contextures.com/xlfaqMac.html#NoMacros

She has some nice instructions with pictures.
 
G

Gord Dibben

Dave

There is no global Office setting that would control the Headers/Footers for
workbooks/worksheets.

Possibly your workbooks were based upon a Template that had the code, but if
most other workbooks don't have it, the Template is no longer being used as
the basis for new workbooks.

Delete the code from the module for this file and save.

To find the "lingering" ones would require manually checking each workbook or
using Chip Pearson's "remove all VBA code" which may be overkill and dangerous
if you have other code you need to keep.

For reference see.... http://www.cpearson.com/excel/vbe.htm


Gord
 

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