+ Reply to Thread
Results 1 to 2 of 2

read cell content and use with Hyperlinks.Add Cell

  1. #1
    Registered User
    Join Date
    09-03-2007
    Posts
    6

    read cell content and use with Hyperlinks.Add Cell

    read cell content and use with Hyperlinks.Add Cell etc. etc.

    I use the code below to read Cell-Content in Column:A and use that to generate a hyperlink with the content off the/a cell.
    The auto-hyperlink works great BUT there seems to be a small flaw in the vba code.
    If I delete the content of a cell (which allready has been auto-hyperlinked with the vba code) then it replaces the just emptied content of the cell with the url (text) => http://www.imdb.com/find?s=all&q= instead of deleting/clear the cell content.

    It seems to me that this line is the problem, at least in my opinion:
    If Cell.Hyperlinks.Count = 0 Then... etc.
    When I look at it, it seems obvious that when I delete the content of a cell (with delete) that the code will drop the http://www.imdb.com/find?s=all&q= line in the cell instead.
    Because a completely emptied cell also is/becomes equal to 0, how could I overcome this?
    Could anybody help me out please? I guess I need to define somehow that when I delete the content of a cell or when cell content is completely empty it should be ignored by the auto-hyperlink code.

    Used in this vba-code (in WorkSheet):
    Please Login or Register  to view this content.
    With kind regards, Tim

  2. #2
    Registered User
    Join Date
    09-03-2007
    Posts
    6

    Thumbs up SOLVED (WorkAround)

    In ThisWorkBook:
    Please Login or Register  to view this content.
    No more on Worksheet_Change because to much to many times, I think I'll use another CheckBox to somehow call/start the function.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1