不太科学的打开文件夹
刚才使用一代码打开ListView选中的文件所在路径,发现重复的也会重新打开,而不是已经打开的文件夹不需要重新打开只需要获得焦点,感觉像病毒一样
Shell "explorer.exe " & 路径, vbNormalFocus
Option Explicit
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Sub Command1_Click()
Dim FilePath As String
FileName = "D:"
Call ShellExecute(Me.hWnd, vbNullString, FilePath, vbNullString, vbNullString, 1)
End Sub