Apologies if I use the wrong wording here, but I have a dynamic hyperlink to one of 50 sheets in cell G5 - it changes depending on what is selected in G6. It looks like this;

=IF(G6="","Select a name below",HYPERLINK("#"&W2&"!A1","Click here to view"))
I would like a piece of VBA code that, whenever G6 is changed, the hyperlink in G5 is 'clicked'.

Is this possible? I've searched all over the web and cannot find an answer. Thanks in advance.