The problem with this, is you might end up with the user resizing the window and seeing cells outside of the bounds that you want them to view.
Another problem you might run into, is you have users who wish the window to be larger or smaller on their screen. To fix this issue, add this VBA code to your Excel program. Don't forget to also add a reference to this code in the Workbook_WindowResize function.
Note: This code works best in office 2016. Earlier versions of office don't trigger the Workbook_WindowResize event when the application window changes size. To fix this, you can run this subroutine recursively with an application.ontime, or you can add it to another event such as Workbook_SheetSelectionChange. |