ActiveExplorer Method
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
Returns the topmost Explorer object on the desktop. If no explorer is active, returns Nothing. Use this method to return the Explorer object that the user is most likely viewing. This method is also useful for determining when there is no active explorer, so a new one can be opened.
expression**.ActiveExplorer**
expression Required. An expression that returns an Application object.
Example
This Visual Basic for Applications example uses ActiveExplorer to demonstrate how to obtain an Explorer object for use, preferably getting the user's active explorer, but creating a new one for myFolder
if there isn't already one on the desktop.
Set myOlApp = CreateObject("Outlook.Application")
Set myExplorer = myOlApp.ActiveExplorer
If TypeName(myExplorer) = "Nothing" Then
Set myExplorer = myFolder.GetExplorer
End If