Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Excel VBA Discuss 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
Old December 15th, 2005, 04:12 PM
Registered User
Join Date: Dec 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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?

Old December 21st, 2005, 11:22 AM
Friend of Wrox
Join Date: Jan 2005
Posts: 180
Thanks: 0
Thanked 0 Times in 0 Posts

Is this what you were after?

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



Old January 6th, 2006, 07:23 PM
Registered User
Join Date: Dec 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

Matt, thanks for taking the time to reply.

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.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Resizing and moving new window through opener Gajender BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 2 July 22nd, 2008 08:40 AM
Auto Sizing Div Width with window resizing javs Javascript 1 March 20th, 2008 01:13 AM
Resizing Main Access Window McDiddy Access VBA 0 January 5th, 2007 04:33 AM
Forward Mouse event in Main window to its controls guntank C# 2005 0 November 15th, 2006 09:32 PM
Resizing controls in a ScrollableForm Layout Event decyclone Pro Visual Basic 2005 0 August 7th, 2006 09:44 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.