Private Declare Function SHBrowseForFolder Lib "SHELL32" (lpbi As BROWSEINFO) As LongPrivate Declare Function SHGetPathFromIDListLong Lib "SHELL32" Alias "SHGetPathFromIDList" (ByVal pIDL&, ByVal lpStr$) As LongPrivate Declare Function GetForegroundWindow Lib "USER32" () As Long
Private Declare PtrSafe Function SHBrowseForFolder Lib "SHELL32" (lpbi As BROWSEINFO) As LongPrivate Declare PtrSafe Function SHGetPathFromIDListLong Lib "SHELL32" Alias "SHGetPathFromIDList" (ByVal pIDL&, ByVal lpStr$) As LongPrivate Declare PtrSafe Function GetForegroundWindow Lib "USER32" () As Long
#If VBA7 And Win64 ThenPrivate Declare PtrSafe Function SHBrowseForFolder Lib "SHELL32" (lpbi As BROWSEINFO) As LongPrivate Declare PtrSafe Function SHGetPathFromIDListLong Lib "SHELL32" Alias "SHGetPathFromIDList" (ByVal pIDL&, ByVal lpStr$) As LongPrivate Declare PtrSafe Function GetForegroundWindow Lib "USER32" () As Long#ElsePrivate Declare Function SHBrowseForFolder Lib "SHELL32" (lpbi As BROWSEINFO) As LongPrivate Declare Function SHGetPathFromIDListLong Lib "SHELL32" Alias "SHGetPathFromIDList" (ByVal pIDL&, ByVal lpStr$) As LongPrivate Declare Function GetForegroundWindow Lib "USER32" () As Long#End If