Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Can a macro create a hyperlink with unique cell information?

I am trying to create a macro that take the information in a cell and add it
to the end of a hyperlink. I need to repeat this function numerous times
with different cell information.

PLEASE HELP!!!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Can a macro create a hyperlink with unique cell information?

Look in Excel help at the worksheetFunction Hyperlink

You don't need a macro.

--
Regards,
Tom Ogilvy

"Desiree" wrote in message
...
I am trying to create a macro that take the information in a cell and add

it
to the end of a hyperlink. I need to repeat this function numerous times
with different cell information.

PLEASE HELP!!!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Can a macro create a hyperlink with unique cell information?

Tom,

I can not use a worksheet Function due to the fact the last 6 characters of
the hyperlink are contacted in that cell. I need to be able to leave the
cell contents alone and add the hyperlink with the last 6 characters added.

Desiree

"Tom Ogilvy" wrote:

Look in Excel help at the worksheetFunction Hyperlink

You don't need a macro.

--
Regards,
Tom Ogilvy

"Desiree" wrote in message
...
I am trying to create a macro that take the information in a cell and add

it
to the end of a hyperlink. I need to repeat this function numerous times
with different cell information.

PLEASE HELP!!!




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Can a macro create a hyperlink with unique cell information?

Not sure what
last 6 characters of
the hyperlink are contacted in that cell.


means, but unless you need the hyperlink placed in the cell with the
information (rather than another cell that uses the information), then a
worksheetfunction can be used.

However, if you want a macro, turn on the macro recorder and add the
hyperlink manually.
Turn off the macro recorder and alter the code to construct the URL you want
and pass it as an argument to the hyperlink.ADD method that you recorded.

This is what i recorded:

ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
"http://www.msnbc.msn.com/id/6306132/", TextToDisplay:="A"


so lets say the cell contains 6306132

I would modify it to
ActiveSheet.Hyperlinks.Add Anchor:=ActiveCell, Address:= _
"http://www.msnbc.msn.com/id/" & Activecell.Value & "/", _
TextToDisplay:=ActiveCell.Value

now I could add a loop to go through my cells selected

Sub AddLinks()
for each cell in Selection
cell.Activate
ActiveSheet.Hyperlinks.Add Anchor:=ActiveCell, Address:= _
"http://www.msnbc.msn.com/id/" & Activecell.Value & "/", _
TextToDisplay:=ActiveCell.Value
Next
End sub

--
Regards,
Tom Ogilvy


"Desiree" wrote in message
...
Tom,

I can not use a worksheet Function due to the fact the last 6 characters

of
the hyperlink are contacted in that cell. I need to be able to leave the
cell contents alone and add the hyperlink with the last 6 characters

added.

Desiree

"Tom Ogilvy" wrote:

Look in Excel help at the worksheetFunction Hyperlink

You don't need a macro.

--
Regards,
Tom Ogilvy

"Desiree" wrote in message
...
I am trying to create a macro that take the information in a cell and

add
it
to the end of a hyperlink. I need to repeat this function numerous

times
with different cell information.

PLEASE HELP!!!






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
hyperlink to website and then to information in a certain cell Ernie[_2_] Excel Worksheet Functions 6 November 11th 09 07:19 PM
In excel, how do I enter unique cell information in a column snowdog120 Excel Worksheet Functions 1 November 7th 06 08:50 PM
How to Create a Macro to Edit a Variable Amount of Information Matt New Users to Excel 4 August 12th 06 10:05 PM
How do I create a hyperlink to a cell with the hyperlink function S. Bevins Excel Worksheet Functions 2 July 20th 06 08:06 PM
Create a HYPERLINK with a macro? bobgerman[_3_] Excel Programming 2 December 22nd 03 06:41 PM


All times are GMT +1. The time now is 06:31 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"