Results 1 to 9 of 9

Creating a hyperlink with a macro

Threaded View

Dror Creating a hyperlink with a... 11-17-2007, 12:40 PM
davesexcel Hi, Let's see what you have... 11-17-2007, 12:47 PM
Simon Lloyd Try this: Private Sub... 11-17-2007, 01:28 PM
Dror Here is a sample file 11-17-2007, 02:28 PM
Leith Ross Hello Dror, This macro... 11-17-2007, 03:36 PM
Dror Works like a charm. Thank... 11-17-2007, 07:03 PM
Dror Another linking question 11-18-2007, 06:54 AM
Leith Ross Hello Dror, This macro... 11-18-2007, 04:06 PM
Dror Amazing 11-18-2007, 05:47 PM
  1. #3
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    Try this:
    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim IB As String
    If Target.Row = 1 Then Exit Sub
            If Target.Cells.Count > 1 Then Exit Sub
                If Target.NumberFormat = "[$$-409]#,##0.00" Then
                IB = InputBox("Enter Destination Cell In This Format A1", "Hyperlink Destination", "Type Here")
        ActiveSheet.Hyperlinks.Add Anchor:=Target.Offset(0, 1), Address:="", SubAddress:= _
            "" & IB, TextToDisplay:=Range(IB).Text
                    Else: Exit Sub
                End If
    End Sub
    EDITED AS PREVIOUS CODE DIDN'T WORK CODE ABOVE WORKS FINE!
    Last edited by Simon Lloyd; 11-17-2007 at 01:38 PM.
    Not all forums are the same - seek and you shall find

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