J
JJ \(UK\)
Hi again
This little bit of code will remove a Hyperlink from a cell:
Range("L3").Select
Selection.Hyperlinks(1).Delete
(Or presumably 'Range("L3")..Hyperlinks(1).Delete' will also work)
But this throws up an error if there is no Hyperlink.
So, two questions I hope someone can help with:
1 - How do you trap errors in VB?
2 - How do you test for the existence of the hyperlink to avoid the error in
the first place?
Oh, and while I'm here, how do I find out which version of VB I've got
installed. The usual 'Help' -> 'About' doesn't tell me a version number (it
just confirms what I already know, which is that I'm using VB!)
Cheers all.
This little bit of code will remove a Hyperlink from a cell:
Range("L3").Select
Selection.Hyperlinks(1).Delete
(Or presumably 'Range("L3")..Hyperlinks(1).Delete' will also work)
But this throws up an error if there is no Hyperlink.
So, two questions I hope someone can help with:
1 - How do you trap errors in VB?
2 - How do you test for the existence of the hyperlink to avoid the error in
the first place?
Oh, and while I'm here, how do I find out which version of VB I've got
installed. The usual 'Help' -> 'About' doesn't tell me a version number (it
just confirms what I already know, which is that I'm using VB!)
Cheers all.