LookUp and Hyperlink
In an Excel woorkbook, i have 2 sheets.
One "User Interface" sheet with a drop-down cell where the user makes his choice and a hidden sheet with a data table
i use the VLOOKUP function to acquire info from the table, which is "pasted" into the "user interface" sheet.
The table has a column with a list of hyperlinks(in this case reports in pdf.files).
In the "user interface" sheet i have pasted a PDF logo/picture. What i want to have is a makro attached to this logo, which open the specific hyperlink (report).
Perhaps this will help you to understand what i mean, although the VBA code does not work:
Sub Hyper()
Application.ScreenUpdating = False
Worksheets("Hidden sheet").Select
Range("=HYPERLINK(VLOOKUP('Hidden sheet'!L50;'Hidden sheet'! K7:K49;'Hidden sheet'!Z7:Z49))").Select
Selection.Hyperlinks(1).Follow NewWindow:=True, AddHistory:=False
Worksheets("User interface sheet").Activate
End Sub
This code works:
Sub Hyper()
Application.ScreenUpdating = False
Worksheets("Hidden sheet").Select
Range("Z4")Select
Selection.Hyperlinks(1).Follow NewWindow:=True, AddHistory:=False
Worksheets("User interface sheet").Activate
End Sub
and this:
=HYPERLINK(VLOOKUP('Hidden sheet'!L50;'Hidden sheet'! K7:K49;'Hidden sheet'!Z7:Z49))
BUT NOT TOGETHER.
What can i do?
|