D
DevDaniel
I have a macro which moves to each worksheet and changes the page setup
properties. The code changes the properties on some worksheets, but not
others.
Have anyone had a similar problem? Is the file corrupt? I have tried
- selecting all worksheets and changing the properties
- looping through each worksheet and changing the properties
Neither worked.
Code snippet:
Dim ws As Worksheet
For Each ws In Worksheets
If ws.Name = "Main" Then
With ws.PageSetup
.PrintQuality = 600
.FitToPagesWide = 1
.FitToPagesTall = False
End With
Else
With ws.PageSetup
.PrintQuality = 600
End With
End If
Next ws
properties. The code changes the properties on some worksheets, but not
others.
Have anyone had a similar problem? Is the file corrupt? I have tried
- selecting all worksheets and changing the properties
- looping through each worksheet and changing the properties
Neither worked.
Code snippet:
Dim ws As Worksheet
For Each ws In Worksheets
If ws.Name = "Main" Then
With ws.PageSetup
.PrintQuality = 600
.FitToPagesWide = 1
.FitToPagesTall = False
End With
Else
With ws.PageSetup
.PrintQuality = 600
End With
End If
Next ws