ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I stop a file from opening in muliple windows? (https://www.excelbanter.com/excel-worksheet-functions/162818-how-do-i-stop-file-opening-muliple-windows.html)

Callie

How do I stop a file from opening in muliple windows?
 
When opening and excel spreadsheet, it opens the file in multiple window with
each one being in a different view. How do you stop this?

JE McGimpsey

How do I stop a file from opening in muliple windows?
 
One way:

Put this in the ThisWorkbook code module:

Private Sub Workbook_Open()
Dim i As Long
With Me.Windows
For i = .Count To 2 Step -1
.Item(i).Close
Next i
End With
End Sub


If you're unfamiliar with macros, see

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In article ,
Callie wrote:

When opening and excel spreadsheet, it opens the file in multiple window with
each one being in a different view. How do you stop this?


Callie

How do I stop a file from opening in muliple windows?
 
This macro did close the other open windows but can you tell me what caused
this to happen from the begininng?

"JE McGimpsey" wrote:

One way:

Put this in the ThisWorkbook code module:

Private Sub Workbook_Open()
Dim i As Long
With Me.Windows
For i = .Count To 2 Step -1
.Item(i).Close
Next i
End With
End Sub


If you're unfamiliar with macros, see

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In article ,
Callie wrote:

When opening and excel spreadsheet, it opens the file in multiple window with
each one being in a different view. How do you stop this?



JE McGimpsey

How do I stop a file from opening in muliple windows?
 
Choosing Window/New Window from the menu.

In article ,
Callie wrote:

This macro did close the other open windows but can you tell me what caused
this to happen from the begininng?


Callie

How do I stop a file from opening in muliple windows?
 
Thank you!

"JE McGimpsey" wrote:

Choosing Window/New Window from the menu.

In article ,
Callie wrote:

This macro did close the other open windows but can you tell me what caused
this to happen from the begininng?




All times are GMT +1. The time now is 11:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com