Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 34
Default Im stuck in VB!

Hey guys-
Got a simple little script here that someone else wrote for me. It
hyperlinks contents from one column to the contents of another. Problem is,
when one or more cells are blank in either column (either the location or
the friendlyname column), the macro breaks. I need something that will tell
it to ignore blank cells and keep going until the end. Can someone tell me
how to do this? Thanks!
Here's the code...

Sub CreateLinks()

Dim LinkRange As Range, cell As Range
Set LinkRange = Range("G1", Range("G65536").End(xlUp))

For Each cell In LinkRange
ActiveSheet.Hyperlinks.Add Anchor:=cell, Address:= _
Range("R" & cell.Row).Value, TextToDisplay:=cell.Value
Range("R" & cell.Row).ClearContents
Next

End Sub

Thanks!
D


  #2   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 27,285
Default Im stuck in VB!

Sub CreateLinks()

Dim LinkRange As Range, cell As Range
Set LinkRange = Range("G1", Range("G65536").End(xlUp))
On Error Resume Next
For Each cell In LinkRange
ActiveSheet.Hyperlinks.Add Anchor:=cell, Address:= _
Range("R" & cell.Row).Value, TextToDisplay:=cell.Value
Range("R" & cell.Row).ClearContents
Next

End Sub

--
Regards,
Tom Ogilvy

"D" wrote in message news:XDbSc.26608$Oi.437@fed1read04...
Hey guys-
Got a simple little script here that someone else wrote for me. It
hyperlinks contents from one column to the contents of another. Problem

is,
when one or more cells are blank in either column (either the location or
the friendlyname column), the macro breaks. I need something that will

tell
it to ignore blank cells and keep going until the end. Can someone tell me
how to do this? Thanks!
Here's the code...

Sub CreateLinks()

Dim LinkRange As Range, cell As Range
Set LinkRange = Range("G1", Range("G65536").End(xlUp))

For Each cell In LinkRange
ActiveSheet.Hyperlinks.Add Anchor:=cell, Address:= _
Range("R" & cell.Row).Value, TextToDisplay:=cell.Value
Range("R" & cell.Row).ClearContents
Next

End Sub

Thanks!
D




  #3   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 34
Default Im stuck in VB!

Tom- once again, you DA MAN!!! Thank you!!!


"Tom Ogilvy" wrote in message
...
Sub CreateLinks()

Dim LinkRange As Range, cell As Range
Set LinkRange = Range("G1", Range("G65536").End(xlUp))
On Error Resume Next
For Each cell In LinkRange
ActiveSheet.Hyperlinks.Add Anchor:=cell, Address:= _
Range("R" & cell.Row).Value, TextToDisplay:=cell.Value
Range("R" & cell.Row).ClearContents
Next

End Sub

--
Regards,
Tom Ogilvy

"D" wrote in message news:XDbSc.26608$Oi.437@fed1read04...
Hey guys-
Got a simple little script here that someone else wrote for me. It
hyperlinks contents from one column to the contents of another. Problem

is,
when one or more cells are blank in either column (either the location

or
the friendlyname column), the macro breaks. I need something that will

tell
it to ignore blank cells and keep going until the end. Can someone tell

me
how to do this? Thanks!
Here's the code...

Sub CreateLinks()

Dim LinkRange As Range, cell As Range
Set LinkRange = Range("G1", Range("G65536").End(xlUp))

For Each cell In LinkRange
ActiveSheet.Hyperlinks.Add Anchor:=cell, Address:= _
Range("R" & cell.Row).Value, TextToDisplay:=cell.Value
Range("R" & cell.Row).ClearContents
Next

End Sub

Thanks!
D






  #4   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 34
Default Im stuck in VB!

Tom-
Got a problem here. If the value of the Friendly name is a number, it will
not link it. If it starts with a letter or anything except a number, it
links it. Is there a way to make this hyperlink even when the friendlyname
is a number value?
Thanks
D



"D" wrote in message news:eMbSc.26609$Oi.13973@fed1read04...
Tom- once again, you DA MAN!!! Thank you!!!


"Tom Ogilvy" wrote in message
...
Sub CreateLinks()

Dim LinkRange As Range, cell As Range
Set LinkRange = Range("G1", Range("G65536").End(xlUp))
On Error Resume Next
For Each cell In LinkRange
ActiveSheet.Hyperlinks.Add Anchor:=cell, Address:= _
Range("R" & cell.Row).Value, TextToDisplay:=cell.Value
Range("R" & cell.Row).ClearContents
Next

End Sub

--
Regards,
Tom Ogilvy

"D" wrote in message news:XDbSc.26608$Oi.437@fed1read04...
Hey guys-
Got a simple little script here that someone else wrote for me. It
hyperlinks contents from one column to the contents of another.

Problem
is,
when one or more cells are blank in either column (either the location

or
the friendlyname column), the macro breaks. I need something that will

tell
it to ignore blank cells and keep going until the end. Can someone

tell
me
how to do this? Thanks!
Here's the code...

Sub CreateLinks()

Dim LinkRange As Range, cell As Range
Set LinkRange = Range("G1", Range("G65536").End(xlUp))

For Each cell In LinkRange
ActiveSheet.Hyperlinks.Add Anchor:=cell, Address:= _
Range("R" & cell.Row).Value, TextToDisplay:=cell.Value
Range("R" & cell.Row).ClearContents
Next

End Sub

Thanks!
D








  #5   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 27,285
Default Im stuck in VB!

Hard to tell without knowing some specifics, but try this: Assume the
Friendly name is Range("R" & cell.row)Value

Sub CreateLinks()

Dim LinkRange As Range, cell As Range
Set LinkRange = Range("G1", Range("G65536").End(xlUp))
On Error Resume Next
For Each cell In LinkRange
ActiveSheet.Hyperlinks.Add Anchor:=cell, Address:= _
format(Range("R" & cell.Row).Value,"@"), TextToDisplay:=cell.Value
Range("R" & cell.Row).ClearContents
Next

End Sub

--
Regards,
Tom Ogilvy


"D" wrote in message news:KxcSc.26612$Oi.18696@fed1read04...
Tom-
Got a problem here. If the value of the Friendly name is a number, it will
not link it. If it starts with a letter or anything except a number, it
links it. Is there a way to make this hyperlink even when the friendlyname
is a number value?
Thanks
D



"D" wrote in message news:eMbSc.26609$Oi.13973@fed1read04...
Tom- once again, you DA MAN!!! Thank you!!!


"Tom Ogilvy" wrote in message
...
Sub CreateLinks()

Dim LinkRange As Range, cell As Range
Set LinkRange = Range("G1", Range("G65536").End(xlUp))
On Error Resume Next
For Each cell In LinkRange
ActiveSheet.Hyperlinks.Add Anchor:=cell, Address:= _
Range("R" & cell.Row).Value, TextToDisplay:=cell.Value
Range("R" & cell.Row).ClearContents
Next

End Sub

--
Regards,
Tom Ogilvy

"D" wrote in message news:XDbSc.26608$Oi.437@fed1read04...
Hey guys-
Got a simple little script here that someone else wrote for me. It
hyperlinks contents from one column to the contents of another.

Problem
is,
when one or more cells are blank in either column (either the

location
or
the friendlyname column), the macro breaks. I need something that

will
tell
it to ignore blank cells and keep going until the end. Can someone

tell
me
how to do this? Thanks!
Here's the code...

Sub CreateLinks()

Dim LinkRange As Range, cell As Range
Set LinkRange = Range("G1", Range("G65536").End(xlUp))

For Each cell In LinkRange
ActiveSheet.Hyperlinks.Add Anchor:=cell, Address:= _
Range("R" & cell.Row).Value, TextToDisplay:=cell.Value
Range("R" & cell.Row).ClearContents
Next

End Sub

Thanks!
D












  #6   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 34
Default Im stuck in VB!

hmmm- nope- no go. Didn't do anything. Maybe I have to do a macro to go in,
add a letter or apostrophe, hyperlink it, then delete it. What a pain...
Thanks
D

"Tom Ogilvy" wrote in message
...
Hard to tell without knowing some specifics, but try this: Assume the
Friendly name is Range("R" & cell.row)Value

Sub CreateLinks()

Dim LinkRange As Range, cell As Range
Set LinkRange = Range("G1", Range("G65536").End(xlUp))
On Error Resume Next
For Each cell In LinkRange
ActiveSheet.Hyperlinks.Add Anchor:=cell, Address:= _
format(Range("R" & cell.Row).Value,"@"), TextToDisplay:=cell.Value
Range("R" & cell.Row).ClearContents
Next

End Sub

--
Regards,
Tom Ogilvy


"D" wrote in message news:KxcSc.26612$Oi.18696@fed1read04...
Tom-
Got a problem here. If the value of the Friendly name is a number, it

will
not link it. If it starts with a letter or anything except a number, it
links it. Is there a way to make this hyperlink even when the

friendlyname
is a number value?
Thanks
D



"D" wrote in message news:eMbSc.26609$Oi.13973@fed1read04...
Tom- once again, you DA MAN!!! Thank you!!!


"Tom Ogilvy" wrote in message
...
Sub CreateLinks()

Dim LinkRange As Range, cell As Range
Set LinkRange = Range("G1", Range("G65536").End(xlUp))
On Error Resume Next
For Each cell In LinkRange
ActiveSheet.Hyperlinks.Add Anchor:=cell, Address:= _
Range("R" & cell.Row).Value, TextToDisplay:=cell.Value
Range("R" & cell.Row).ClearContents
Next

End Sub

--
Regards,
Tom Ogilvy

"D" wrote in message news:XDbSc.26608$Oi.437@fed1read04...
Hey guys-
Got a simple little script here that someone else wrote for me. It
hyperlinks contents from one column to the contents of another.

Problem
is,
when one or more cells are blank in either column (either the

location
or
the friendlyname column), the macro breaks. I need something that

will
tell
it to ignore blank cells and keep going until the end. Can someone

tell
me
how to do this? Thanks!
Here's the code...

Sub CreateLinks()

Dim LinkRange As Range, cell As Range
Set LinkRange = Range("G1", Range("G65536").End(xlUp))

For Each cell In LinkRange
ActiveSheet.Hyperlinks.Add Anchor:=cell, Address:= _
Range("R" & cell.Row).Value, TextToDisplay:=cell.Value
Range("R" & cell.Row).ClearContents
Next

End Sub

Thanks!
D












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
Sorry but i am stuck again KODIAK BEAR New Users to Excel 5 October 1st 07 08:46 PM
Im stuck again... Meader Excel Discussion (Misc queries) 2 May 29th 07 01:23 AM
This ones got me stuck DB Excel Worksheet Functions 4 April 4th 07 09:25 PM
stuck darkbearpooh1 Excel Worksheet Functions 7 February 10th 06 10:21 PM
Still stuck Adrian Excel Programming 5 May 21st 04 03:56 PM


All times are GMT +1. The time now is 10:52 AM.

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

About Us

"It's about Microsoft Excel"