I have a dynamic hyperlink in A1 created via a formula based on 2 DV lists as follows:
=HYPERLINK("[&$B$1&".xls]"&$C$1&"!Link","Goto")
1. A1 contains a DV list of workbook names.
2. B1 contains a DV list of worksheet names.
3. Every worksheet in workbook contains a single-cell named-range named "Link" which is the default home position for that worksheet.
This method works perfectly for my application by offering a user definable hyperlink. I do not want to change this (ie DV list based on another DV list, etc). What I have is exactly what I want... except...
By doing this via a formula in a cell, I cannot protect the formula without checking "Select Locked Cells" when protecting the worksheets. Can't have that, but, if I leave it unlocked it is vulnerable. You also have the problem of the user clicking on a locked cell. That selects my unlocked hyperlink, sending the user, unintentionally, to a different workbook. Of course, if I lock the cell, the hyperlink does not function. What I would like to do is attach this same formula to an autoshape that I can format as I like, but eliminate the problems of having the dynamic hyperlink formula in a cell. How would I write VBA code for the above formula so that I can create a macro to assign to an autoshape?
I am open to other ideas, as long as:
1. The resulting hyperlink is dynamically based on the 2 DV lists
2. I have full control over the design format (as with autoshape)
Also note that I have tried recording a macro by typing in the formula, but it won't take.
=HYPERLINK("[&$B$1&".xls]"&$C$1&"!Link","Goto")
1. A1 contains a DV list of workbook names.
2. B1 contains a DV list of worksheet names.
3. Every worksheet in workbook contains a single-cell named-range named "Link" which is the default home position for that worksheet.
This method works perfectly for my application by offering a user definable hyperlink. I do not want to change this (ie DV list based on another DV list, etc). What I have is exactly what I want... except...
By doing this via a formula in a cell, I cannot protect the formula without checking "Select Locked Cells" when protecting the worksheets. Can't have that, but, if I leave it unlocked it is vulnerable. You also have the problem of the user clicking on a locked cell. That selects my unlocked hyperlink, sending the user, unintentionally, to a different workbook. Of course, if I lock the cell, the hyperlink does not function. What I would like to do is attach this same formula to an autoshape that I can format as I like, but eliminate the problems of having the dynamic hyperlink formula in a cell. How would I write VBA code for the above formula so that I can create a macro to assign to an autoshape?
I am open to other ideas, as long as:
1. The resulting hyperlink is dynamically based on the 2 DV lists
2. I have full control over the design format (as with autoshape)
Also note that I have tried recording a macro by typing in the formula, but it won't take.