如何选定文件或文件夹

Option Explicit
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
'测试
Private Sub Command1_Click()
selectitem "e:\mc\mmtest.jpg"
Sleep 10000
selectitem "e:\mc"
End Sub

Private Sub selectitem(ByVal itempath As String)
On Error Resume Next
Shell "explorer /select, " + itempath, vbNormalFocus
End Sub
原文地址:https://www.cnblogs.com/szyicol/p/517790.html