L
Les
Hi all, I am would like to know if it is possible to detemine how many
instances of Excel are open. I know it is possible to check how many
workbooks, with the code below but i wouold like to check the number of
instances open, before closing the application.
Sub chkWkbToClosePo()
'
Dim wkb As Integer
Application.IgnoreRemoteRequests = False
Application.DisplayAlerts = True
Application.ScreenUpdating = True
wkb = Application.Workbooks.Count
If wkb <= 2 Then
Application.Quit
Else
ActiveWorkbook.Close
End If
End Sub
instances of Excel are open. I know it is possible to check how many
workbooks, with the code below but i wouold like to check the number of
instances open, before closing the application.
Sub chkWkbToClosePo()
'
Dim wkb As Integer
Application.IgnoreRemoteRequests = False
Application.DisplayAlerts = True
Application.ScreenUpdating = True
wkb = Application.Workbooks.Count
If wkb <= 2 Then
Application.Quit
Else
ActiveWorkbook.Close
End If
End Sub