set windows

P

Peter

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,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top