PDA

View Full Version : Solved: Separated tables in one page



YasserKhalil
06-28-2010, 04:02 AM
Hi everybody
How are you??

I have four tables and I want to set printarea for table 1 and 3 so that the two tables can be previewed and printed in one page
I could set printarea but I found that the two tables will be printed in two pages
I want them to be printed in just one page
Thanks ...

Bob Phillips
06-28-2010, 04:15 AM
Surely you just lay the tables 1 and 3 so that they are next to each other?

YasserKhalil
06-28-2010, 04:21 AM
the tables are separated and my request is to make the two tables one union and they can be printed in one page
I want to apply this idea with other tables

Bob Phillips
06-28-2010, 04:47 AM
There is no need to union them, just set the print area appropriately.

YasserKhalil
06-28-2010, 05:02 AM
Mr. Mark
I'm sorry if my request isn't clear enough
I attached a file so that it would be more clearly
I want the two tables (1 and 3) to be in one page when previewed not in two pages as in the attached file

Bob Phillips
06-28-2010, 05:08 AM
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet

If .Name = "Yasser" Then

.PageSetup.PrintArea = "$A$1:$G$41"
.Rows("14:27").Hidden = True
End If
End With
End Sub

YasserKhalil
06-28-2010, 05:22 AM
Thank you very much Mr. Mark
It's my great pleasure to know a person like you
I was lucky to find that great forum