Hey guys, welcome back. So in this video we're going to discuss the follow hyperlink event. So the follow hyperlink event gets triggered whenever you click on a hyperlink in your worksheet. Okay, so I'm gonna click Create a hyperlink, okay, I'm just gonna write HTTP, and then colon and then slash last google.com here, okay? And this is a hyperlink if you click on it, you're going to go to google.com. Okay, so let's check that event.
So I'm just going to right click here on my follow hyperlink worksheet, click on View code and then click on worksheet. And then we're going to click here on follow hyperlink. I'm just going to remove here the selection change event because we don't need it. And then I'm just going to have a message box okay. So message box you are going to, you are going to do that then a space here. Then an ampersand because you're there is A target parameter.
So the target refers to the hyperlink. It's a hyperlink object. Okay? Not a range object. It's a hyperlink object. So target address.
Okay, so what is property of its properties is basically the address property. So if you click on the link, you can see here that we're actually going to go to google.com. Plus, we're going to have a message box. Okay, so we've had a message box, and we've gotten to google.com. So that's basically what it does, it just can trigger any code whenever you click on a link on your worksheet, okay. You could also play with other properties for the link so I can actually change the name of the link, I can right click here and click on Edit hyperlink and just change its name, maybe make it more friendly.
So go to Google, for example. Okay, and then I can right click here, go to View code, go to my code, and then messagebox I can just view the text for the link. Okay, so target dot name. Target dot name is basically the name of the link. There are other properties and methods, you can feel free to explore them, Google them and check them on msdn.com. But these are the most used ones.
Okay? And just gonna click here on the link. And you're also going to go to Google and you're going to have a message box that says go to Google. Okay. So that's basically the follow hyperlink event. Okay.
Thank you for watching this video guys. I'll see you on the next one.