Hyperlink not working on Mac

birchs92

New Member
Joined
Nov 1, 2007
Messages
44
Dear All

The following code works fine on Windows 8/Excel 2007, but will not work on Mac computer

I am struggling to find a solution

The code takes the postcode elements from columns 30-31 of the selected row appends them to the URL and navigates to address

Thanks in advance
Simon

Code:
Public Sub Link()
    Dim Postcode As String
    Dim AreaDistrict As Integer
    Dim SectorUnit As Integer
    
    AreaDistrict = 30
    SectorUnit = 31
   
    Postcode = Cells(ActiveCell.Row, AreaDistrict) & " " & Cells(ActiveCell.Row, SectorUnit)
    
    Dim full As String
    Dim part1 As String
    Dim part2 As String
    
    part1 = "http://universe.geopostuk.com/cds/menuController.do?menu=depot_search#multiple/filterData=&premiumService=false&searchType=geo_advanced_search&searchSelects=&search-scope=C&postcode_collection_date_days=3&delivery_date_days=3&hub_date_days=3&account_collection_date_days=3&radioOptions=&advanced=postcode&advanced.postcode=postcode_collection_date&searchInputs=&postcode_radio=postcode&account_radio=account&container_label_radio=container_label&postcode="
    part2 = "&postcode_collection_date_radio=postcode_collection_date&delivery_date_radio=delivery_date&undefined=customer_ref&undefined=advanced_phone_number&undefined=advanced_email_address&postcode_collection_date=01/06/2015"
    
    'http://universe.geopostuk.com/cds/menuController.do?menu=depot_search#multiple/filterData=&premiumService=false&searchType=geo_advanced_search&searchSelects=&search-scope=C&postcode_collection_date_days=1&delivery_date_days=1&hub_date_days=1&account_collection_date_days=1&radioOptions=&advanced=postcode&advanced.postcode=postcode_collection_date&searchInputs=&postcode_radio=postcode&account_radio=account&container_label_radio=container_label&postcode=BS99 7AR&postcode_collection_date_radio=postcode_collection_date&delivery_date_radio=delivery_date&undefined=customer_ref&undefined=advanced_phone_number&undefined=advanced_email_address&postcode_collection_date=01/06/2015
    
    full = part1 & Postcode & part2
    
    ThisWorkbook.FollowHyperlink Address:=full, AddHistory:=False
End Sub
 
Last edited by a moderator:

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

Forum statistics

Threads
1,196,254
Messages
6,014,274
Members
441,810
Latest member
LouLou1234

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