ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   set windows (https://www.excelbanter.com/excel-programming/338337-set-windows.html)

Peter[_55_]

set windows
 
Hi,

Situation:

Private Sub Workbook_Open()
Application.ScreenUpdating = False
'KLEIN SCHERM
Application.WindowState = xlNormal
Application.Left = 196
Application.Top = 208.75
'UITZICHT EXCEL
With ActiveWindow
.DisplayGridlines = False
.DisplayHeadings = False
.DisplayOutline = False
.DisplayZeros = False
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
.DisplayWorkbookTabs = False
End With
With Application
.DisplayFormulaBar = False
.DisplayStatusBar = False
.DisplayCommentIndicator = 0
.ShowWindowsInTaskbar = False
End With

Problem:

Before I close the workbook, I would like to set excel back to default
(Maximized window)
I've put in:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.WindowState = xlMaximized
End Sub

But that did not work.

Please advise.

Regards,




All times are GMT +1. The time now is 12:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com