Glory
Well-known Member
- Joined
- Mar 16, 2011
- Messages
- 640
Eg:
.Printout applies to a worksheet object, not the pagesetup object.
Is there a statement that allows a temporary break from the conditions of a with-block inside itself?
Code:
With theSheet.[COLOR=red]PageSetup[/COLOR]
[COLOR=#ff0000][/COLOR]
If a2 = 1 Then PrintArea = "A1:E21": .Zoom = 150
If a2 = 2 Then .PrintArea = "A1:E43"
If a2 = 3 Then .PrintArea = "A1:K21"
.[COLOR=red]PrintOut[/COLOR]
[COLOR=#ff0000][/COLOR]
'clears settings after printing
.PageSetup.PrintArea = False
.PageSetup.CenterVertically = False
.PageSetup.Zoom = 91
End With
.Printout applies to a worksheet object, not the pagesetup object.
Is there a statement that allows a temporary break from the conditions of a with-block inside itself?