#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Hyperlinks

Hi

I have a column of many web page hyperlinks is it possible to edit a
hyperlink with a macro to delete certain characters, like the 8 to 12th
characters. Instead of right clicking edit hyperlink, Then move to the next,
I then check this hyperlink if it needs to be changed I then run the macro
again.

Thanks in advance

Dave



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Hyperlinks

one way
Sub edithyperlinks()
For Each c In Range("i1:i3")
c.Value = Left(c, 7) & "XXXX" & Right(c, Len(c) - 11)
Next
End Sub


--
Don Guillett
SalesAid Software

"DavidM" wrote in message
. uk...
Hi

I have a column of many web page hyperlinks is it possible to edit a
hyperlink with a macro to delete certain characters, like the 8 to 12th
characters. Instead of right clicking edit hyperlink, Then move to the
next, I then check this hyperlink if it needs to be changed I then run the
macro again.

Thanks in advance

Dave





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Hyperlinks

Sub CheckLinks()
Dim s as String, ans as Long
if Activecell.Hyperlinks.count 0 then
s = Activecell.Hyperlinks(1).Address
ans = msgbox("hyperlink is " & vbNewLine & s & vbNewline _
& vbNewline & " Make a correction?", vbYesNo)
if ans = vbYes then
s = Left(s,7) & Right(s,len(s)-12)
ActiveCell.Hyperlinks(1).Address = s
end if
end if
activecell.offset(1,0).Select
End Sub

--
Regards,
Tom Ogilvy


"DavidM" wrote in message
. uk...
Hi

I have a column of many web page hyperlinks is it possible to edit a
hyperlink with a macro to delete certain characters, like the 8 to 12th
characters. Instead of right clicking edit hyperlink, Then move to the
next, I then check this hyperlink if it needs to be changed I then run the
macro again.

Thanks in advance

Dave





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Hyperlinks

Thanks Don

Thanks Tom


"Tom Ogilvy" wrote in message
...
Sub CheckLinks()
Dim s as String, ans as Long
if Activecell.Hyperlinks.count 0 then
s = Activecell.Hyperlinks(1).Address
ans = msgbox("hyperlink is " & vbNewLine & s & vbNewline _
& vbNewline & " Make a correction?", vbYesNo)
if ans = vbYes then
s = Left(s,7) & Right(s,len(s)-12)
ActiveCell.Hyperlinks(1).Address = s
end if
end if
activecell.offset(1,0).Select
End Sub

--
Regards,
Tom Ogilvy


"DavidM" wrote in message
. uk...
Hi

I have a column of many web page hyperlinks is it possible to edit a
hyperlink with a macro to delete certain characters, like the 8 to 12th
characters. Instead of right clicking edit hyperlink, Then move to the
next, I then check this hyperlink if it needs to be changed I then run
the macro again.

Thanks in advance

Dave







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
How toi turn-off hyperlinks [excel]? Email hyperlinks pop up ! jacob735 Excel Discussion (Misc queries) 1 June 22nd 07 12:57 AM
Excel Hyperlinks- cell content v. hyperlinks herpetafauna Excel Discussion (Misc queries) 2 May 23rd 06 04:39 AM
Hyperlinks to =Hyperlinks formula - Challenging Electro911 Excel Programming 7 March 2nd 06 02:00 AM


All times are GMT +1. The time now is 11:45 PM.

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"