Forum Discussion
frankxu
Feb 15, 2023Copper Contributor
Problem in VBA to assign Hyperlink formula built dynamically.
Repost this to Macros and VBA label: I want to add a dynamic hyper link to a column (cell) so that I can open the folder after I run the macro. There are two worksheets in my workbook: Main, Sheet1....
HansVogelaar
Feb 15, 2023MVP
Concatenating with Chr(34) is an alternative for doubling " in a quoted string. You should not use Chr(34) & Chr(34):
strTemp = "=HYPERLINK(Main!R5C2" & Chr(32) & Chr(38) & Chr(32) & Chr(34) & "\" & strFolder & Chr(34) & "," & Chr(34) & "Open Folder" & Chr(34) & ")"