Hi,
I have an excel file which has 100 worksheets.. I need to add hyperlink to "home" worksheet in A1 cell of every worksheet. Can this be done through quickly through VBA ?
Thanks in advance
Shreeram
Adding hyperlink in all sheets
-
- 2StarLounger
- Posts: 181
- Joined: 19 Feb 2016, 16:54
- Location: Veraval, India
-
- Administrator
- Posts: 12601
- Joined: 16 Jan 2010, 15:49
- Location: London, Europe
Re: Adding hyperlink in all sheets
Code: Select all
Dim sht As Worksheet
For Each sht In Worksheets
If sht.Name <> "Sheet1" Then
sht.Hyperlinks.Add Anchor:=sht.Range("A1"), Address:="", SubAddress:="'Sheet1'!A1", TextToDisplay:="Home"
End If
Next sht
StuartR
-
- 2StarLounger
- Posts: 181
- Joined: 19 Feb 2016, 16:54
- Location: Veraval, India
Re: Adding hyperlink in all sheets
Thanks a lot Stuart