October 5, 2010
Hi Bill,
you need to modify the declarations and data types as described in this article
https://docs.microsoft.com/en-.....fe-keyword
Private Declare PtrSafe Function SHBrowseForFolder Lib "Shell32.dll" (bBrowse As BrowseInfo) As LongLong
Private Declare PtrSafe Function SHGetPathFromIDList Lib "Shell32.dll" (ByVal lItem As LongLong, ByVal sDir As String) As LongLong
But if you just want the user to choose a folder you can use Application.FileDialog
With Application.FileDialog(msoFileDialogFolderPicker)
If .Show = True Then
DestFolder = .SelectedItems(1)
Else
MsgBox "You must specify a folder to save the PDF into." & vbCrLf & vbCrLf & "Press OK to exit this macro.", vbCritical, "Must Specify Destination Folder"
Exit Sub
End If
End With
https://docs.microsoft.com/en-.....filedialog
Regards
Phil
1 Guest(s)