| 
    
     |  | おはようございます。 まだよくわかりませんが・・・。
 新規ブックで試してみてください
 。
 
 
 参照設定として「Microsoft Internet Controls」にチェックをしてください。
 
 このブックのThisworkbookのモジュールに
 '=======================================================
 Private WithEvents ep As InternetExplorer
 Private ie_end As Boolean
 '=======================================================
 Function get_selectitem(ByVal mypath As Variant, Optional ByVal myfilter As Variant = "*") As Variant
 Dim fl As Object
 get_selectitem = False
 Set ep = CreateObject("InternetExplorer.Application")
 With ep
 .Visible = True
 .MenuBar = False
 .navigate mypath
 Do While .Busy = True Or .ReadyState <> 4
 DoEvents
 Loop
 With .document
 On Error Resume Next
 ie_end = True
 Do While ie_end = True
 For Each fl In .SelectedItems
 If fl.Name Like myfilter Then
 DoEvents
 get_selectitem = fl.Name
 Exit For
 End If
 Next
 DoEvents
 If TypeName(get_selectitem) <> "Boolean" Then Exit Do
 Loop
 Application.Wait Now() + TimeValue("00:00:02")
 End With
 If ie_end = False Then get_selectitem = False
 DoEvents
 .Quit
 End With
 Set ep = Nothing
 End Function
 '=======================================================
 Private Sub ep_OnQuit()
 DoEvents
 ie_end = False
 End Sub
 
 
 標準モジュールに
 
 '=======================================================
 Sub main()
 Dim ans
 ans = ThisWorkbook.get_selectitem("D:\My Documents\TESTエリア\testarea2002")
 'フォルダパスを指定する
 DoEvents
 AppActivate Application.Caption
 If TypeName(ans) <> "Boolean" Then
 MsgBox ans
 End If
 End Sub
 
 
 このmainを実行してください。
 
 指定したフォルダが表示されます。
 何か選択すると、選択したファイル名が表示されます。
 Win2000&Excel2002で確認。
 
 このようなことですか?
 
 |  |