Is there an Event for resizing the main XL window?
|
Excel VBADiscuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Is there an Event for resizing the main XL window?
I am building an application that has forms that overlay the the areas above and below the workbook. If a user resizes the main XL window (smaller), my forms will appear to hang out over the desktop. Ideally, I would like to use an event (like the workbook resize event) to deal with this. Is there such an event? Alternatively, is there a way to prevent the user from being able to resize the XL window?
Sub Change_Excel_Size()
Application.WindowState = xlNormal
With Application
.Left = 222.25
.Top = 289.75
.Width = 127.5
.Height = 30.75
End With
End Sub
Your solution tells how to re-size, but my burning need is to have my code know WHEN to resize, or as an alternative, how to prevent the user from re-sizing the XL app window.