I have a specific cell that I can click on manually that has a HYPERLINK with calculated value based on the data within the worksheet. To work out the correct cell to hyperlink to, I use the LET function to remove duplicated function calls within the cell formula. This works fine.
What I need now is to simulate within an existing VBA macro is clicking on that cell to achieve the same effect. Selecting the cell and then issuing
fails as I expected because the first function encountered in the cell is LET (within which the last parameter is "hyperlink(...)"), nor is there a link defined on the cell - because the cell to be jumped to needs to be calculated first based on the data in the worksheet.
I also looked into SENDKEY as an option but cannot find how to 'sendkey' a click of the mouse.
What is the VBA code I need to simulate the mouse press on the cell (P4 in this case)?
Thanks for the help.
What I need now is to simulate within an existing VBA macro is clicking on that cell to achieve the same effect. Selecting the cell and then issuing
VBA Code:
ActiveWorkbook.FollowHyperlink ActiveCell.Hyperlinks(1).Address
I also looked into SENDKEY as an option but cannot find how to 'sendkey' a click of the mouse.
VBA Code:
Range("P4").Select ' select this cell which will allow me to go to first unfilled data cell
Application.SendKeys "~", True ' except ~ is an Enter not a mouse click on the cell
What is the VBA code I need to simulate the mouse press on the cell (P4 in this case)?
Thanks for the help.