Hello,
I am trying to have a window autosize upon opening, everything from A1 to O34. I find the following code which I have tried to adjust but I don't know enough about these functions to make it work for me. This was for a version of Monopoly in Excel:
Sub ZoomToFit()
ThisWorkbook.Sheets("Board").Range("a1").Activate
On Error GoTo errtrap
With ActiveWindow
'zoom out
Do While Not Intersect(.VisibleRange.Cells, Range("corner_cell").Cells) Is Nothing
.Zoom = .Zoom + 5
Loop
'zoom in
Do While Intersect(.VisibleRange.Cells, Range("corner_cell").Cells) Is Nothing
.Zoom = .Zoom - 5
Loop
End With
Exit Sub
errtrap:
ActiveWindow.Zoom = 75
End Sub
If anybody has a simple way to do this for A1:O34 that would really help me out a lot. Thanks for your help guys.
Will
Bookmarks