Best is to use the methods in NotesUIWorkspace: To get a file is just:
Dim ws as New NotesUIWorkspace
Dim varFile as Variant
varFile = ws.OpenFileDialog( False ) 'for one file, for multiple files use True
To get a folder use:
Dim ws as New NotesUIWorkspace
Dim varFolder as Variant
varFolder = ws.SaveFileDialog( True ) 'in this case True = directories only
In varFile(0) / varFolder(0) is the foldername, or isEmpty( varFile ) is true, if nothing selected