Code to Print Pages

D

dswiders

I have a very large excel workbook and each one of the sheets needs
to
be set to have 5 pages. However, there is often times where some of
the sheets do not have text printed on each one of the 5 pages so
when
I print the workbook only the header prints on the blank pages. Does
anyone know of a visual basic program I could use to print the
workbook but only the pages that have text on them?
 
D

David McRitchie

Rather than reposting the somewhat ambiguous question,
please post the parameters of what you need in a macro.

What does being set to 5 pages mean, does everything
fit on the width of a page. What constitutes no data
considering that you would have header rows and columns.
What about page numbering when printing all those worksheets
selectively.

If you really don't have the data that Excel thinks you
have, perhaps you have a last cell problem check
Ctrl+End to see if that is beyond the intersection of
your last used row and column. If it is then see
Why do my scrollbars go to row 500 -- my data ends in cell E50?, contextures.com, Debra Dalgleish.
http://www.contextures.com/xlfaqApp.html#Unused
and use the macro don't bother with manual removal.
If you have merged cells then you could lose formatting
on the right sides of worksheets since merged cells
only address the upper left cell of the merged cells.
--
 

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