Unable To Open HyperLink SubAddress Pointing To A Different Workbooks' Worksheet

StringAndBranes

New Member
Joined
Feb 24, 2019
Messages
4
Hello and just a thanks to everyone in advance :):). I am using Excel 2010, old but it suits my needs ;) I need someones assistance on how to open a Hyperlink with a subaddress. See below and please advise:


(01) In the active workbook, I am able to create a hyperlink with a sub address (see below) that refers to a separate unopened Workbook called "Toggle Sort Columns.xlsm" that has the worksheet called WWWWWWW that has the cells D8:F10. When I am in the workbook that created the link, I can open the link pointing to the subaddress in the separate workbooks' worksheet (I placed the created link in a cell and was able to click on the cell that contained the link).
Hyperlink created:
(a) C:\ZZZ\ZZZ\Zzzz\TOGGLE SORT COLUMNS.xlsm - WWWWWWW!D8:F10
(b) Code:
Code:
Sheets("Create Hyperlink").Hyperlinks.Add _
Anchor:=Sheets("Create Hyperlink").Range("A1"), _
Address:=Sheets("Create Hyperlink").Range("PathandFileNm"), _
SubAddress:=Sheets("Create Hyperlink").Range("FileWksName") & "!" & Range("FileRange"), _
TextToDisplay:=""
(02) Issue: In a separate workbook (not previously mentioned) I placed the hyperlink (See 01a above) into a worksheet and show it in a forms' listbox. Note: When I click on the link in the worksheet it opens the hyperlink pointing to the subaddress. When I select the listbox item with the link (See 01a above) I get "Error -2147221014 Can Not Open The File".


(c) Code used to open:
Code:
        ' BELOW WORKS ON URL'S BUT CAN'T GET IT TO WORK ON SUBADDRESS
        Dim FileLoc As String
        '
        FileLoc = LbSelItems_Array(i, 3)
        ThisWorkbook.FollowHyperlink (FileLoc)
        Exit For
        ' ABOVE WORKS ON URL'S BUT CAN'T GET IT TO WORK ON SUBADDRESS
Note: Fileloc has the below:
C:\ZZZ\ZZZ\Zzzz\TOGGLE SORT COLUMNS.xlsm - WWWWWWW!D8:F10
 

Some videos you may like

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

StringAndBranes

New Member
Joined
Feb 24, 2019
Messages
4
Hello Everyone,
This is just a followup. If someone has had a change to review my question, can you please update this thread with just a one liner, so I can know that is being reviewed; does not have to have a resolution, just something so I can know the posting of my original question has been received.

Thanks
 

Watch MrExcel Video

Forum statistics

Threads
1,109,385
Messages
5,528,400
Members
409,817
Latest member
JiNXX9500

This Week's Hot Topics

  • Change military grades into rank
    Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
  • VBA COUNTIF SOLUTION
    Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
  • INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
    Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
  • Auto-Create a monthly Sign in sheet for preschool students
    The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
  • VBA vlookup multiple results
    Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
  • Extract values for earliest/latest times
    I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...
Top