0
votes

As a state of the seats of Excel ...

There are plural seats.

The first seat name is "list"

The other seats get possible to move in hyperlink from the list sheet.

the seat name are "example1", the "example2" .

Please teach VBA setting hyperlink to "list" sheet to the A1 cell of each seat

2

2 Answers

0
votes

It's difficult to understand what is being asked here so I'll assume that the question is as follows.

"How can I use VBA to create a hyperlink in cell A1 on each sheet of a workbook to link back to the sheet with name list."


Dim ws As Worksheet

For Each ws In ThisWorkbook.Worksheets
    If ws.Name = "List" Then
        'Do nothing for the list sheet.
    Else
        ws.Hyperlinks.Add Anchor:=ws.Range("A1"), Address:="", _
              SubAddress:="List!A1", TextToDisplay:="Go to List Sheet"
    End If
Next
0
votes

This code will generate a menu on the 'List' worksheet linking to cell A1 of all worksheets.

The link text is set to the worksheets name.

Sub Add_Hyperlink()

 Dim wsSheet As Worksheet

 Worksheets("List").Range("A1").Select
  For Each wsSheet In Worksheets
   ActiveCell.Offset(1, 0).Select
   ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _
    wsSheet.Name & "!A1", TextToDisplay:="" & wsSheet.Name
 Next wsSheet

End Sub