+ Reply to Thread
Results 1 to 3 of 3

bookmark/hyperlink

Hybrid View

  1. #1
    Registered User
    Join Date
    12-29-2004
    Posts
    37

    Question bookmark/hyperlink

    Hi,

    I'm looking to create 5 words or buttons that when clicked on will take you a certain location within the sheet. I also need to have that location be at upper left hand corner. sort of like a navigation bar, any ideas?

    I've tried the hyperlink, but it only takes me to the cell specified but it doesn't put that cell in the upper lefts. I need to jump to that cell quick and be able to see everything below that cell. (would this be a programing question?)

    thanks,
    - Zerosleep

  2. #2
    Registered User
    Join Date
    02-24-2005
    Posts
    11

    Smile

    Use the Goto method.

    Example:

    Private Sub TestCellUpperLeft_Click()
    Application.Goto Reference:=Worksheets("Sheet2").Range("O34"), Scroll:=True
    End Sub

    "Scroll" is an optional variant that places the requested cell in the upper left corner of the page.

    I hope this helps!

  3. #3
    Registered User
    Join Date
    02-24-2005
    Posts
    11

    Smile

    This may be more what you are looking for:

    *Right click the cell and select "Hyperlink".
    *On the popup, select "Bookmark'.
    *Type in your reference or select a sheet and target cell or select a named range. Click "OK".
    *You can change the reference or the display text in the main window. Click "OK".
    Now hit ALT + F11 to open the Visual Basic Editor, in the objects menu double click "This Workbook", and paste in the macro below:

    Private Sub Workbook_SheetFollowHyperlink(ByVal Sh As Object, ByVal Target As Hyperlink)
    Application.Goto Reference:=Range(Target.SubAddress), Scroll:=True
    End Sub

    As an FYI, this macro will apply to all hyperlinks in your workbook. If you want to limit this to the hyperlinks on a specific page only then select the worksheet in the VB Editor and paste in this macro:

    Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
    Application.Goto Reference:=Range(Target.SubAddress), Scroll:=True
    End Sub

    Have a great day!

+ 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