| 
    
     |  | にー さん、ichinose さん、こんばんわ。 
 WinXP(管理者)+Excel2003で以下のコードを実行してみました。
 確実に存在するネットワークパスになるようにして実行すると、ちゃんとフォルダが開きました。
 
 Sub フォルダオープン(変数1 As String, 変数2 As String)
 '
 Dim objShell As Object, objFolder As Object
 Dim FSO As Object, WshShell As Object
 Dim FolN As String, SPath As String,A$ '(A As String)
 
 FolN = "\\ネットワーク共有フォルダ\○○\" & 変数1 & "\" & 変数2
 'フォルダチェック
 On Error Resume Next
 A$ = Dir(FolN, vbDirectory)
 On Error GoTo 0
 '分岐
 If A$ = "" Then
 MsgBox FolN, vbExclamation, "Folder Not Found"
 Else
 Set objShell = CreateObject("Shell.Application")
 Set FSO = CreateObject("Scripting.FileSystemObject")
 Set WshShell = CreateObject("WScript.Shell")
 'SPath = FSO.GetFolder(FolN).ShortPath 'この行はいらないと思う
 WshShell.Run FolN, 3, False
 Set FSO = Nothing: Set WshShell = Nothing
 Set objFolder = Nothing: Set objShell = Nothing
 End If
 End Sub
 
 パス名とアクセス権を確認してみてはいかがでしょうか?
 
 |  |