View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dick Kusleika[_3_] Dick Kusleika[_3_] is offline
external usenet poster
 
Posts: 599
Default How handle Hyperlinks

Sly

Here's the direct approach

Sub CopyHyperlink()

With Sheet1.Cells(1, 1).Hyperlinks(1)
Sheet1.Cells(10, 10).Hyperlinks.Add _
Anchor:=Sheet1.Cells(10, 10), _
Address:=.Address, _
SubAddress:=IIf(Len(.SubAddress) = 0, "", .SubAddress), _
ScreenTip:=IIf(Len(.ScreenTip) = 0, "", .ScreenTip), _
TextToDisplay:=.TextToDisplay

End With

End Sub

Although Mark's response is probably the best unless it causes some other
problem.

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com

"Sylvester" wrote in message
...
don't work - copies text but not hyperlink - thats where I
was with the variables.

Appreciate the response - any other ideas,

Sly
-----Original Message-----
Hi
try
worksheets("sheet2").cells(10,10).value = _
worksheets("sheet1").cells(1,1).value



--
Regards
Frank Kabel
Frankfurt, Germany

"Sylvester" schrieb

im
Newsbeitrag news:130bf01c44361$b4e4aab0

...
I have amacro that goes through sheet1, reads what it

has
to and writes to sheet2. The data is processed as

string
variables using Cell references.

There are some hyperlinks that I would like to put to
sheet2 also but I can't make a go of it.

Say Sheet1 Cells(1,1)is a hyperlink .. How do I put it

in
Sheet2 Cells(10,10)??

Many thanks,

Sly


.