Reputation: 1
I need to write a Macro in VBA that when the user clicks on the assigned macro, it will activate the hyperlink in the given cell. The macro is going to be attached to a picture rather then seeing the text of the hyperlink. I have this code right now and it does work, however, when the macro activates the hyperlink, it minimizes the folder it opened, when it should open it on top of excel like when a user would click directly on a hyperlink.
Sub FollowHyperlink()
'
' FollowHyperlink Macro
'
Shell "explorer.exe " & Range("T6").Text
'
End Sub
Upvotes: 0
Views: 504
Reputation: 11
Sub FollowHyperlink()
'
' FollowHyperlink Macro
'
a = Shell("C:\Program Files\Internet Explorer\iexplore.exe " & Range("T6").Text, vbMaximizedFocus)
'
End Sub
Upvotes: 1