+ Reply to Thread
Results 1 to 3 of 3

Creating Hyperlink in excel 2003 VBA

Hybrid View

  1. #1
    sweet_dreams
    Guest

    Creating Hyperlink in excel 2003 VBA

    Hi all,

    I was trying to create hyperlink to other sheet in excel I did it like
    that:

    Sheets("Index").Activate
    Range("a2").Hyperlinks.Add Range("a2"), "", "Control list", , "List"

    where "Control List" is the name of sheet I am trying to open

    but it doesn't work.

    Can U tell me what's wrong???

    regards,
    sweet_dreams


  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,524
    =HYPERLINK("#Sheet3!A1","Sheet2!A1") this takes you to Sheet3 A1 and will label where you are going
    =HYPERLINK("#Sheet3!A1",A2) this will take you to sheet 3 A1 but the cell will have the value of A2 of whatever sheet you have this formula in

    I will Add that this is a formula in the spreadsheets not a VBA code
    Last edited by davesexcel; 03-07-2006 at 07:37 AM.

  3. #3
    Ardus Petus
    Guest

    Re: Creating Hyperlink in excel 2003 VBA

    Sub test()
    With Sheets("Index")
    .Hyperlinks.Add _
    Anchor:=.Range("A2"), _
    Address:="", _
    SubAddress:="'Control list'!A2", _
    TextToDisplay:="List"
    End With
    End Sub

    HTH
    --
    AP

    "sweet_dreams" <[email protected]> a écrit dans le message de
    news:[email protected]...
    > Hi all,
    >
    > I was trying to create hyperlink to other sheet in excel I did it like
    > that:
    >
    > Sheets("Index").Activate
    > Range("a2").Hyperlinks.Add Range("a2"), "", "Control list", , "List"
    >
    > where "Control List" is the name of sheet I am trying to open
    >
    > but it doesn't work.
    >
    > Can U tell me what's wrong???
    >
    > regards,
    > sweet_dreams
    >




+ 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