# Thread: Set print area dinamiclly... (2000 sr-1)

1. ## Set print area dinamiclly... (2000 sr-1)

How to set the print area dinamiclly and set automaticlly the zoom of real dimension...?
Actually i have make zoom 59%...
i use A4 paper...

2. ## Re: Set print area dinamiclly... (2000 sr-1)

Can you explain how you want to set the zoom percentage?

3. ## Re: Set print area dinamiclly... (2000 sr-1)

In rela project i have set the zoom dimension of page manually and to see all vlaue i have set this zoom to 59% and not 100%...

4. ## Re: Set print area dinamiclly... (2000 sr-1)

But that is not clear enough. If you set the zoom percentage to 16%, the entire range fits onto one page. If you set it to 40% in portrait mode, the entire document fits on two pages. So you must tell us exactly what you want.

5. ## Re: Set print area dinamiclly... (2000 sr-1)

i need...
1) A print area range dinamiclly of all value in sheet
2) auto fit in A4 based the dinamiclly range

6. ## Re: Set print area dinamiclly... (2000 sr-1)

There are many ways you can print all data.

"Auto fit" is not uniquely defined - you can autofit all data on 1 page, or on 2 pages, or on 15 pages, or ...
You will have to specify what you want.

7. ## Re: Set print area dinamiclly... (2000 sr-1)

Yuor "student"...
Wath you think about? is a simple code but with you suggestion is a great code:-)

Option Explicit
Sub ShowUsedRange()

Dim ELENCO As Worksheet
Dim RIGA_MAX As Integer
Dim COLONNA_MAX As Integer

Set ELENCO = Sheets("REPORT")
With ELENCO
RIGA_MAX = .Cells(65536, 1).End(xlUp).Row '+ 1
COLONNA_MAX = .Range("B2").End(xlToRight).Column
ActiveSheet.PageSetup.PrintArea = "\$A\$1:" & Cells(RIGA_MAX, COLONNA_MAX).Address
End With

End Sub

8. ## Re: Set print area dinamiclly... (2000 sr-1)

Does it do what you wanted?

YES...

10. ## Re: Set print area dinamiclly... (2000 sr-1)

Well, that's great then!

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•