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
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
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
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top