Dim fol As String
fol = "C:\GL Summary" ' change to match the folder path
Set fso = CreateObject("Scripting.FileSystemObject")
If Not fso.FolderExists(fol) Then
If MsgBox("Folder created! Do you want to open the folder to move your files?", vbYesNo + vbInformation, "Open Excel Folder") = vbYes Then Shell Environ("windir") & "\explorer.exe " & Application.CurrentProject.Path & "C:\GL Summary\", vbNormalFocus
MsgBox fol & " already exists!", vbExclamation, "Folder Exists!"
I am trying to open the above folder via VBA using a 'Yes/No' message. However I am getting an 'object doesn't support this property or method error' in this part 'Shell Environ("windir") & "\explorer.exe '
Any help is much appreciated!