• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Excel Application Window Resize

David Sion

New Member
Hi,
I have created a Workbook in excel 2010, with one Worksheet and limited the display to columns C:K by hiding all other columns and View > Zoom to Selection.
I would like this (Zoom to Selection) to happen when I resize the Excel window (not the worksheet within the excel window).
Thanks,
 
Last edited:
David

Firstly, Welcome to the Chandoo.org Forums

Would the following work:

Code:
Private Sub Workbook_WindowResize(ByVal Wn As Window)
  Columns("C:K").Select
  ActiveWindow.Zoom = True
End Sub

It must be located in the ThisWorkbook module in VBA
 
Thanks,
This works only for resizing the Workbook window within the application window.
I was refering to a situation where one does not work with full screen but with smaller application window and resizing this window.
David
 
Back
Top