+ Reply to Thread
Results 1 to 3 of 3

copy cell value as an address to create a hyper link

Hybrid View

  1. #1
    Registered User
    Join Date
    08-24-2009
    Location
    Montreal, QC
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: copy cell value as an address to create a hyper link

    I had trouble wit hthe edit botton, so i will add this here,

    this is the newbie code i wanna use

    Sub NewTest()
    '
    ' NewTest Macro
    '
    ' Keyboard Shortcut: Ctrl+Shift+W
    '
        Sheets("Sheet1").Select
        ActiveCell.Offset(1, -2).Range("A1").Select
        Selection.Copy
        Sheets("Sheet2").Select
        ActiveSheet.Paste
        ActiveCell.Offset(0, 1).Range("A1").Select
        Sheets("Sheet1").Select
        ActiveCell.Offset(0, 1).Range("A1").Select
        ActiveCell.FormulaR1C1 = _
            "the link selected in Sheet 1"
        Sheets("Sheet2").Select
        ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
            "the link copied from Sheet 1" _
            , TextToDisplay:="Main Page"
        ActiveCell.Offset(0, 1).Range("A1").Select
        Sheets("Sheet1").Select
        ActiveCell.Offset(0, 1).Range("A1").Select
        ActiveCell.FormulaR1C1 = _
            "The link selected in Sheet 1"
        Sheets("Sheet2").Select
       ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
            "the link copied from Sheet 1" _
            , TextToDisplay:="Maps"
        Sheets("Sheet1").Select
        ActiveCell.Offset(1, -2).Range("A1").Select
    End Sub
    how bad is this, lol
    Last edited by Anas9; 08-25-2009 at 02:48 AM.

+ 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