Excel Macro Hyperlink Not Working
I am very new to marcos and am having trouble.
As part of a macro I was working on, I wanted to open the hyperlink of a selected cell (contains link to another workbook.)
When I run the macro it gives me the usual warning to make sure the link is from a trustworthy source, and asks if Id like to open the file. I click ok, then the hourglass comes up for a few seconds and then it goes away. Nothing happens though, the file does not open.
But, If I click the actual cell that contains the hyperlink, it gives me the warning, I click ok, and then the file opens. Its frustrating that it worked before I saved and closed it.
If I have it link to a word document, then the Macro will work. Or if I open a second Excel session and run the macro, then it will open the linked workbook, but in the first excel session if that makes sense.
I created the code using the Macro Recorder. While recording, when I click on the cell with the hyperlink it will open, but not after Ive finished and tried to run the macro. Please help.
Sub Macro1()
'
' Macro1 Macro
Range("B7").Select
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
End Sub