I've written some code that will attach multiple files to an entry in a database and, if there's only one file attached, clicking a hyperlink will take you to that specific file. When there's more than one file, however, I would like to have a userform open with buttons to go to the files...
I've written the following code; however, the code lets the first file open (because that's what's linked) and then opens the window I want.
I've written the following code; however, the code lets the first file open (because that's what's linked) and then opens the window I want.
Code:
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
If InStr(Sheets("MTRs").Cells(ActiveCell.Row, 1).Value, "(") Then
Load Multifile
Multifile.Show
End If
End Sub