Moonbeam111
Board Regular
- Joined
- Sep 24, 2018
- Messages
- 73
- Office Version
- 365
- 2010
Please excuse me but I'm stuck in a complicated spot.
So I'm trying to open a hyperlink through vba so I do not have to manually click it everytime. It' in Range("J133"). The traditional answer to this is probably
Well my problem is that the hyperlink in cell J133 is actually a reference to another hyperlink in H130. The actual formula for my cell in J33 is this.
I needed to use this formula to substitute a portion of the name from the referenced hyperlink to use the cell text values from range "H133" instead.
The traditional answer keeps giving me a subscript out of range. I tried this as well:
And get a 'file not found error'.
Is it possible I can open this hyperlink through VBA still? Even though I changed part of the name using the substitute function in excel? It's not that big of a deal ( if I click the link manually it works just fine) just trying to save time. Any help would be appreciated.
So I'm trying to open a hyperlink through vba so I do not have to manually click it everytime. It' in Range("J133"). The traditional answer to this is probably
VBA Code:
Range("J133").Hyperlinks(1).Follow.
Well my problem is that the hyperlink in cell J133 is actually a reference to another hyperlink in H130. The actual formula for my cell in J33 is this.
Excel Formula:
=HYPERLINK(SUBSTITUTE(H130,"example text",H133),H133 & " " & "example text")
I needed to use this formula to substitute a portion of the name from the referenced hyperlink to use the cell text values from range "H133" instead.
The traditional answer keeps giving me a subscript out of range. I tried this as well:
VBA Code:
Sub Hyperlink()
Shell "C:\Program Files\Mozilla Firefox\firefox.exe\" & Range("J133").Text
End Sub
And get a 'file not found error'.
Is it possible I can open this hyperlink through VBA still? Even though I changed part of the name using the substitute function in excel? It's not that big of a deal ( if I click the link manually it works just fine) just trying to save time. Any help would be appreciated.