Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hyperlinks: Hyperlinks change on copy/paste? Rick S. Excel Worksheet Functions 0 November 13th 07 08:19 PM
Update 2000 Excel hyperlinks to 2003 hyperlinks lonv155 Excel Worksheet Functions 4 October 25th 07 05:51 AM
linking script for hyperlinks for excel Steph Setting up and Configuration of Excel 2 October 9th 07 07:14 PM
Excel Hyperlinks- cell content v. hyperlinks herpetafauna Excel Discussion (Misc queries) 2 May 23rd 06 04:39 AM
Excel 2000/XP script to Excel97 script hat Excel Programming 3 March 2nd 04 03:56 PM


All times are GMT +1. The time now is 09:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"