Workbook_Open problem
Try
Private Sub Workbook_Open()
With Application.ThisWorkbook.Windows(1)
.Width = 275
.Height = 270
End With
End Sub
--
Regards,
Tom Ogilvy
"TroyH" wrote in message
...
Why do I keep getting this error:
Run-time error '1004':
Unable to set the Width property of the Windows class
In my ThisWorkbook object I have the following code:
Private Sub Workbook_Open()
With ActiveWindow
.Width = 275
.Height = 270
End With
End Sub
This only errors out when I open Excel with the file. If Excel is already
open, no error.
The worksheet is not protected.
Thanks.
|