Bringing open folder to the front

if the folder is open and I close the folder first and then reopen it will bring it to the front

Sub folderCad_Pile()

Dim objShell, strFolder, file

Const FOLDER = "\Jewelerscad\Cad_Pile\"  

Set objShell = CreateObject("WScript.Shell")
strFolder = objShell.SpecialFolders("MyDocuments")
strFolder = strFolder & FOLDER 

'MsgBox strFolder 

Call OpenFolder(strFolder)

End Sub

Sub OpenFolder(strFolder)

Const COMMAND = "Explorer.exe / e,"
Dim objFSO, objShell, strError, strCommand

Set objFSO = CreateObject("Scripting.FileSystemObject")
If Not objFSO.FolderExists(strFolder) Then
	strError = "Folder not found - " & strFolder		
	Call MsgBox(strError, vbOKOnly + vbCritical, "Open Folder")
	Exit Sub
End If

Set objShell = CreateObject("WScript.Shell")
strCommand = COMMAND & strFolder
Call objShell.Run(strCommand)

End Sub

Hi @cadguy,

You might look here.

– Dale