PDA

View Full Version : check for hyperlink



hamz
12-14-2006, 05:51 PM
Hi! VBA experts,Could you help how to check or validate if a particular cell value has a hyperlink or not? My current excel worksheet has about 6,000 rows with two 12 columns(sort of a table). Column A has 6,000 rows with some values on cells has hyperlink. I just want to search for cells that has hyperlinks.Thanks.Hamz

Zack Barresse
12-14-2006, 06:23 PM
Hi there and welcome to the board!

The real question here is: what do you want to do with them? Do you want a formula to return a boolean (TRUE/FALSE) result? Do you want to select all hyperlinks? Do you want to do something else with them? Do you want to remove the hyperlinks? What about HYPERLINK() formulas?

hamz
12-17-2006, 06:22 PM
Actually, your all your questions were valid. Yes, i want a True or False return, and if true a command button will enable and allow the user to click itto view the hyperlink file. And if false a command button will enable and whenclicked promt the user to delete it or not.Any suggesttions?

mdmackillop
12-18-2006, 12:52 AM
How are you intending to identify the particular cell to be checked?
Your seem to be asking two separate questions here, Post #3 seems relevant to Q1, but not Q2. What do you intend with found cells from Q2?

darmstrong
08-10-2007, 06:40 AM
How would you get a boolean (TRUE/FALSE) result as to whether or not a particular cell contains a hyperlink?

My current (non-boolean) test is:
linkAddress = .Cells(xstart, I).Hyperlinks.SubAddress

but it errors with

Runtime error 438
Object doesn't support this property or method

when it encounters a cell with no hyperlink.

David

Bob Phillips
08-10-2007, 08:10 AM
Try this



MsgBox ActiveCell.Hyperlinks.Count > 0