Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Script to recognize hyperlinks?
I'm using a for each...next loop to examine a range of cells that was
brought in through a web query. For each cell, I need to evaluate if it's hyperlinked and if so, if it has text in it or is a blank cell with a hyperlink or is a cell with text buy no hyperlink. What do I put in my if statements to distinguish these possibilities? TIA, Jim |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Script to recognize hyperlinks?
Maybe something like this will get you started:
Option Explicit Sub testme() Dim myCell As Range Dim myRng As Range Set myRng = ActiveSheet.Range("a1:a3") For Each myCell In myRng.Cells If myCell.Hyperlinks.Count 0 Then MsgBox "has link" Else MsgBox "no link" End If If IsEmpty(myCell.Value) Then MsgBox "it's empty" Else MsgBox "it's not empty" End If Next myCell End Sub wrote: I'm using a for each...next loop to examine a range of cells that was brought in through a web query. For each cell, I need to evaluate if it's hyperlinked and if so, if it has text in it or is a blank cell with a hyperlink or is a cell with text buy no hyperlink. What do I put in my if statements to distinguish these possibilities? TIA, Jim -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hyperlinks: Hyperlinks change on copy/paste? | Excel Worksheet Functions | |||
Update 2000 Excel hyperlinks to 2003 hyperlinks | Excel Worksheet Functions | |||
linking script for hyperlinks for excel | Setting up and Configuration of Excel | |||
Excel Hyperlinks- cell content v. hyperlinks | Excel Discussion (Misc queries) | |||
Excel 2000/XP script to Excel97 script | Excel Programming |