Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Excel.Range, Cancel As Boolean)
- Dim testo As String
- Dim nomefile As String
- Dim path As String
- On Error Resume Next
- If Target.Column = 5 Then
- path = "C:UsersAlex"
- testo = path & Cells(Target.Row, 5)
- nomefile = Dir(Left(testo, Len(testo)) & "*.pdf")
- If nomefile = "" Then
- MsgBox "File non trovato", vbCritical, "ATTENZIONE"
- Exit Sub
- End If
- Do
- Shell "C:Program Files (x86)AdobeReader 11.0ReaderAcroRd32.exe " & path & nomefile, vbMaximizedFocus
- nomefile = Dir
- Loop While nomefile <> ""
- End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement