![]() |
macro to change a name of a hyperlink
Is there a way to change what is displayed on a hyperlink in vb code? I
would like for a input box to appear and ask what name would you like to call the link? Thanks Greg |
the macro recorder is your friend
Sub Macro5() ' ' Macro5 Macro ' Macro recorded 9/16/2005 by Don Guillett ' ' Selection.Hyperlinks(1).TextToDisplay = "my yahoo 11" End Sub now change to Selection.Hyperlinks(1).TextToDisplay = inputbox("enter name")'"my yahoo 11" -- Don Guillett SalesAid Software "Greg B" wrote in message ... Is there a way to change what is displayed on a hyperlink in vb code? I would like for a input box to appear and ask what name would you like to call the link? Thanks Greg |
thanks Don
"Don Guillett" wrote in message ... the macro recorder is your friend Sub Macro5() ' ' Macro5 Macro ' Macro recorded 9/16/2005 by Don Guillett ' ' Selection.Hyperlinks(1).TextToDisplay = "my yahoo 11" End Sub now change to Selection.Hyperlinks(1).TextToDisplay = inputbox("enter name")'"my yahoo 11" -- Don Guillett SalesAid Software "Greg B" wrote in message ... Is there a way to change what is displayed on a hyperlink in vb code? I would like for a input box to appear and ask what name would you like to call the link? Thanks Greg |
It works great Have made little changes with your code. I tried the macro
builder but it remained blank. Thanks again Greg "Don Guillett" wrote in message ... glad to help -- Don Guillett SalesAid Software "Greg B" wrote in message ... thanks Don "Don Guillett" wrote in message ... the macro recorder is your friend Sub Macro5() ' ' Macro5 Macro ' Macro recorded 9/16/2005 by Don Guillett ' ' Selection.Hyperlinks(1).TextToDisplay = "my yahoo 11" End Sub now change to Selection.Hyperlinks(1).TextToDisplay = inputbox("enter name")'"my yahoo 11" -- Don Guillett SalesAid Software "Greg B" wrote in message ... Is there a way to change what is displayed on a hyperlink in vb code? I would like for a input box to appear and ask what name would you like to call the link? Thanks Greg |
All times are GMT +1. The time now is 06:35 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com