View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Workbook_Open problem

Well, this is the first time you mentioned anything about maximized windows.

The obvious solution is to check if it is maximized or forget the check and
make in normal

Private Sub Workbook_Open()
With Application.ThisWorkbook.Windows(1)
.WindowState = xlNormal
.Width = 275
.Height = 270
End With
End Sub

--
Regards,
Tom Ogilvy


"TroyH" wrote in message
...
Thanks Tom for the reply. It works as well, but I keep getting that error.

It will always appear if the last window opened before closing Excel is
maximized. If the last window is normal, then there is no problem.

Any ideas?