Thread: set windows
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Peter[_55_] Peter[_55_] is offline
external usenet poster
 
Posts: 24
Default 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,