LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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


 
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 07:17 PM.

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"