Hello All,
Please review the full working code to open any file and shows the file path.
Can you please change the code so it can use the Shell command to open the file not hyperlink,
Reason is that I don't want the alert(some files contain viruses........etc) that is asscociated with Hyperlink method to show.
Thank you
Please review the full working code to open any file and shows the file path.
Can you please change the code so it can use the Shell command to open the file not hyperlink,
Reason is that I don't want the alert(some files contain viruses........etc) that is asscociated with Hyperlink method to show.
Thank you
Code:
Sub OPENFILE()
Dim fd As FileDialog
Set fd = Application.FileDialog(msoFileDialogFilePicker)
Dim vrtSelectedItem As Variant
With fd
If .Show = -1 Then
For Each vrtSelectedItem In .SelectedItems
ThisWorkbook.FollowHyperlink (vrtSelectedItem)
Application.CutCopyMode = False
MsgBox vrtselecteditem
Next vrtSelectedItem
'The user pressed Cancel.
Else
End If
End With
'Set the object variable to Nothing.
Set fd = Nothing
End Sub