Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printout

Status
Not open for further replies.

tytus2005

Programmer
Joined
Jul 5, 2005
Messages
16
Location
PL
I wrote a macro to hide an empty rows - and it works ok, but when I want to print sheet with hidden rows, excel show (on printout preview) empty space - so even if I want to print only one row (from 40 I have) I get one row on first page, then empty space and last row (summary) on second page - is there any way to avoid printing hidden rows and how to set it in VBA?
 
Yes there are many ways to do this, but I don't really see why you are having the problem in the first place. I have tested printing a sheet with hidden rows and it printed correctly. Is it possible that you have page breaks in your hidden rows or that you are somehow selecting all the rows ?
Another possibility is to use the little known selection criteria - Selection.SpecialCells(xlCellTypeVisible)

Richard
 
You're right - but from the unknown reasons on 3 (from 4) of my worksheets it didn't work. But as they were very similar to each other I've just copied the correct one and now everything is ok. But still - I don't know why it wasn't working before.

Best regards,

Tytus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top