richExcelforAJ
New Member
- Joined
- Jul 12, 2022
- Messages
- 4
- Office Version
- 365
- Platform
- Windows
I have two forms in my workbook.
Whenever I unload either of them, the Excel application maximizes. So, I set the Application window state and the active window state to xlNormal:
Application.WindowState = xlNormal
ActiveWindow.WindowState = xlNormal
I tried both methods immediately before and immediately after the 'unload form' statement. When I unload either form, the Excel Application instantly maximizes and then returns to normal. The above commands both work but not in time to prevent a very disconcerting flash to maximized and back.
Both the red X and the form close button execute the same code and behave the same.
The sequence is just
Load form
form.show
Unload form
This is the form Exit code:
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Unload frmCustomerData
Application.WindowState = xlNormal
'Unload frmTransparent
Worksheets("Dashboard").Select
Worksheets("Dashboard").Visible = True
Application.ScreenUpdating = True
Application.DisplayAlerts = True
Has anyone seen this before or have suggestions on preventing it?
Below are the form properties for one of the forms.
Whenever I unload either of them, the Excel application maximizes. So, I set the Application window state and the active window state to xlNormal:
Application.WindowState = xlNormal
ActiveWindow.WindowState = xlNormal
I tried both methods immediately before and immediately after the 'unload form' statement. When I unload either form, the Excel Application instantly maximizes and then returns to normal. The above commands both work but not in time to prevent a very disconcerting flash to maximized and back.
Both the red X and the form close button execute the same code and behave the same.
The sequence is just
Load form
form.show
Unload form
This is the form Exit code:
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Unload frmCustomerData
Application.WindowState = xlNormal
'Unload frmTransparent
Worksheets("Dashboard").Select
Worksheets("Dashboard").Visible = True
Application.ScreenUpdating = True
Application.DisplayAlerts = True
Has anyone seen this before or have suggestions on preventing it?
Below are the form properties for one of the forms.