Posts by thepalv

    Hi there

    Hope i'm in the right forum for this. I have a huge spreadsheet of a list of contacts. I have created buttons using hyperlinks to go from menus to the contacts details. Sometimes this was causing the link to bring me to a cell at the bottom of the page, which would obscure the contact details. So i am using code which i got on this forum to always direct me to the cell in the top left corner. This has been very helpful

    However, now i am getting runtime errors when i click on the email addresses of contacts. It is correctly bringing up a new Outlook email message window with the email address in the TO field. But behind that window is a runtime error window "run time error 1004. Method 'range' of object '_Global' failed"

    When i press Debug it brings me into VBA with the second line of the code below highlighted in yellow.

    Private Sub Workbook_SheetFollowHyperlink(ByVal Sh As Object, ByVal Target As Hyperlink)

    Application.Goto Range(Target.SubAddress), True

    End Sub

    I don't think I was getting this error when i started using this code but cannot be sure.

    Any help would be greatly appreciated!
    PS I don't understand much about code so as simple as you can make the explanation would be great!