Substituir
On Error Resume Next
isFolder = wFolder.document.folder
If Err = 0 Then
com
If(wFolder.FullName = "C:\Windows\Explorer.EXE") Then
Set objShellApp = CreateObject("Shell.Application")
Dim winFolder
For Each wFolder In objShellApp.Windows
On Error Resume Next
isFolder = wFolder.document.folder ' An IE window does not support ".document.folder". We get the first Windows Explorer window.
If Err = 0 Then
wFolder.Visible = True
Set winFolder = wFolder
Exit For
End If
Next
Deve haver uma maneira melhor de distinguir entre o Windows Explorer e o Internet Explorer.
Eu aprecio sua ajuda.
VBS: Selecionar item na última janela ativa do Windows Explorer
Substituir
On Error Resume Next
isFolder = wFolder.document.folder
If Err = 0 Then
com
If(wFolder.FullName = "C:\Windows\Explorer.EXE") Then