+ Reply to Thread
Results 1 to 3 of 3

Problem in Hyperlink - Reference to a cell of another sheet

Hybrid View

abduljaleel.mca Problem in Hyperlink -... 05-08-2013, 06:36 AM
tehneXus Re: Problem in Hyperlink -... 05-08-2013, 07:19 PM
abduljaleel.mca Re: Problem in Hyperlink -... 05-09-2013, 12:11 AM
  1. #1
    Valued Forum Contributor abduljaleel.mca's Avatar
    Join Date
    02-13-2013
    Location
    Chennai, India
    MS-Off Ver
    MS 365 Business
    Posts
    326

    Problem in Hyperlink - Reference to a cell of another sheet

    I have 2 sheets in a excel file, one of the sheet name is 'Test' and another one is 'Final Data'.
    Creating hyperlink from sheet 'Test' to sheet 'Final Data'. My code is as below

    Worksheets("Final Data").Activate 'This will change project to project
    sht = ActiveSheet.Name
    Worksheets("Test").Activate
    Cells(x, 2).Select
    ActiveCell.Hyperlinks.Add ActiveCell, Address:="", SubAddress:=sht & "!A" & y, ScreenTip:=Cells(x, 2).Value
    Worksheets(sht).Activate
    Cells(y, 13).Value = "Back"
    Cells(y, 13).Select
    ActiveCell.Hyperlinks.Add ActiveCell, Address:="", SubAddress:="Test!B" & x, ScreenTip:="Test"
    But it is not working, showing 'Reference Invalid' error.
    Suppose my second sheet name is 'FinalData' (without space) it is working fine. I can't send this file to client with a sheet name 'FinalData'.

    Anyway to create a hyperlink to a sheet which contains blanks in its name?

  2. #2
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: Problem in Hyperlink - Reference to a cell of another sheet

    try
    ActiveCell.Hyperlinks.Add ActiveCell, Address:="", SubAddress:="'" & sht & "'!A" & y, ScreenTip:=Cells(x, 2).Value
    Please use [CODE]-TAGS
    When your problem is solved mark the thread SOLVED
    If an answer has helped you please click to give reputation
    Read the FORUM RULES

  3. #3
    Valued Forum Contributor abduljaleel.mca's Avatar
    Join Date
    02-13-2013
    Location
    Chennai, India
    MS-Off Ver
    MS 365 Business
    Posts
    326

    Re: Problem in Hyperlink - Reference to a cell of another sheet

    Really Awesome...

    Thank You...Thank You...Thank You...

+ 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