• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA code to print what you see ignoring hidden rows and not leaving space for them

wnorrick

Member
I have a report that will be printed monthly for over 200 departments so there are over 200 reports with data specific to each department. It is a budget variance report and only budget line items that exceed a certain percentage have to be explained in the report. The report is set up with all of the possible budget line items and the ones that don't need an explanation that month will be hidden. We need to pdf the report then for inclusion in monthly package. When I print or print to pdf it doesn't print the hidden rows but it leaves space for them so the report prints with gaps. Is there VBA code that will only print rows not hidden? All help is appreciated. I have attached a very abbreviated sample file. The Ops report workheet is the one that will be printed and I have hidden 4 rows for the sample. Thank you,
Wanda
 

Attachments

  • Sample file (1).xlsx
    18.9 KB · Views: 6
Hi,

I'm not sure I follow... I can't find any hidden rows in the BC report.
Can you tell which rows are hidden?

Thanks
 
Rows 18, 19, 20 and 21 are hidden on the Ops report. That is the one that I need to print and not leave the blank space for those rows on the pdf or hard copy of the report. I appreciate you taking a look at this.
Thank you,
Wanda
 
Rows 18, 19, 20 and 21 are hidden on the Ops report. That is the one that I need to print and not leave the blank space for those rows on the pdf or hard copy of the report. I appreciate you taking a look at this.
Thank you,
Wanda

Sorry... I was looking at the BC instead of Ops (distracted I guess :()
Trying to print it here, I get this:
Sem Título.jpg
Do you get empty spaces above Conc - Miscellaneous? It seems fine to me.
What am I missing?
 
Yes, I do get large space above Conc - Miscellaneous. Let me check settings. What you have is what I want and actually thought it would do. Thank you for your help.
Wanda
 
Gee, a senior moment I guess:) I have it working now too. I apologize to everyone for wasting anyone's time.
Have a great day PCosta and thank you again for being patient with me
Wanda
 
Gee, a senior moment I guess:) I have it working now too. I apologize to everyone for wasting anyone's time.
Have a great day PCosta and thank you again for being patient with me
Wanda
No problem... it is never a waste of time.
Have a nice day and a great weekend ;)
 
Back
Top