I have a spread sheet with rollover hyperlinks to change cells certain colours when the mouse hovers over them. I also have a script which allows me to double click on a cell which makes it open a file location so the user can choose which (or multiple) files to open.
however. when I try to add the actual file name on the end of the file destination it doesn't seem to accept it. my code is shown below. what am I doing wrong?
I have attached the spread sheet and shown code below
'Macro to apply to range of cells and open location files for multiple selection
Private Sub Worksheet_BeforeDoubleClick(ByVal target As Range, Cancel As Boolean)
Set t = target
Set e6 = Range("e6")
If Intersect(t, e6) Is Nothing Then Exit Sub
Cancel = True
ChDir "C:\Users\boymam\desktop"
Which = Application.GetOpenFilename(MultiSelect:=True)
If IsArray(Which) Then
For I = 1 To UBound(Which)
Workbooks.Open Which(I)
Next
End If
End Sub
when I try to add a file name after the "C:\users\boymam\desktop" It doesn't work, either im added wrong or the codes wrong? if someone could show me how to add the actual file id appreciate it,
thanks
Bookmarks