Share via

Excel online - hyperlink to hidden sheets

Anonymous
2022-08-25T08:31:33+00:00

I use the following code in a spreadsheet. Is there anyway to adapt the code, or use office scripts, so it works in Excel online?

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)

LinkTo = Target.SubAddress 

WhereBang = InStr(1, LinkTo, "!") 

If WhereBang > 0 Then 

    MySheet = Left(LinkTo, WhereBang - 1) 

    Worksheets(MySheet).Visible = True 

    Worksheets(MySheet).Select 

    MyAddr = Mid(LinkTo, WhereBang + 1) 

    Worksheets(MySheet).Range(MyAddr).Select 

End If 

End Sub

Many thanks

Microsoft 365 and Office | Excel | Other | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2022-08-26T07:34:22+00:00

    Hello SaraVill

    Welcome to the Microsoft Community.

    From the /Excel/ category you posted, we know your question is "need to use a VBA program in Excel online". Please feel free to correct me if my understanding is wrong.

    According to Microsoft's official statement , Excel online has relatively limited functions . Currently, you cannot create, run or edit VBA (Visual Basic for Applications) macros in Excel for the web, but you can open and edit workbooks that contain macros. Any existing macros will remain in the workbook, which you can open in the Excel desktop application to view and edit the macros.

    Best regards,

    Chandy|Microsoft Community Support Specialist


    * Beware of scammers posting fake support numbers here.

    * Your patience and cooperation are highly appreciated.

    Was this answer helpful?

    0 comments No comments