| < Free Open Study > |
|
The following procedure will close all open windows in the IDE that currently have not been changed since they were saved. It uses the Documents collection to access the open windows. It uses the Saved property of the Document.Items() object to determine if a document is saved or "dirty".
Public Sub CloseAllSavedWindows() ' Close all saved documents. Dim i As Integer With oVB On Error Resume Next For i = .Documents.Count To 1 Step -1 If .Documents.Item(i).Saved Then .Documents.Item(i).Close(vsSaveChanges .vsSaveChangesPrompt) End If Next i End With End Sub
| < Free Open Study > |
|