J
John Crosher
I am trying to ensure that the sheet window in an Excel workbook always opens
maximized and remains protected in that state, so that users cannot resize
it. If the window element of the workbook is protected and saved before
closing the workbook, it always reopens as a restored window, not maximised,
regardless of the window size when it was closed.
That is the case whether the sizing and protection is done manually, or
using a code fragment such as:-
With Workbooks(WBName)
.Unprotect
.Windows(1).WindowState = xlMaximized
.Protect , True, True
.Close True
End with
This behaviour appears to conflict with the Excel Help (e.g.XLXP) for
"Workbook protection (Windows)", which says:-
"Windows element, When selected, prevents users from:
"Changing the size and position of the windows for the workbook when the
workbook is opened."
"Moving, resizing, or closing the windows. However, they can hide and
unhide windows." "
This behaviour seems to have existed since XL97 through XL2003, and there is
no MS KB article which addresses this issue.
Can anyone help, please?
maximized and remains protected in that state, so that users cannot resize
it. If the window element of the workbook is protected and saved before
closing the workbook, it always reopens as a restored window, not maximised,
regardless of the window size when it was closed.
That is the case whether the sizing and protection is done manually, or
using a code fragment such as:-
With Workbooks(WBName)
.Unprotect
.Windows(1).WindowState = xlMaximized
.Protect , True, True
.Close True
End with
This behaviour appears to conflict with the Excel Help (e.g.XLXP) for
"Workbook protection (Windows)", which says:-
"Windows element, When selected, prevents users from:
"Changing the size and position of the windows for the workbook when the
workbook is opened."
"Moving, resizing, or closing the windows. However, they can hide and
unhide windows." "
This behaviour seems to have existed since XL97 through XL2003, and there is
no MS KB article which addresses this issue.
Can anyone help, please?