|
发表于 2011-10-13 23:50
|
显示全部楼层
本楼为最佳答案
工作表事件 没有双击事件,双击是修改事件,但必须是退出单元格时 才发生! 不符你要求!
下面的代用是写单击 选取单元格事件- Private Sub Worksheet_SelectionChange(ByVal Target As Range)
- If Target.Count > 1 Then Exit Sub
- If Target.Column <> 2 Then Exit Sub
- If Len(Target) = 0 Then Exit Sub
- Dim myPath$
- myPath = Left(Target, Len(Target) - Len(Target.Offset(, -1)) - 1)
- If MsgBox(myPath, 4 + 32, "确定要打开下面的文件夹吗?") = vbNo Then Exit Sub
- Shell "explorer.exe " & myPath, vbNormalFocus
- End Sub
复制代码 |
|