S
Shaz
Hi all
The following macro will list all the worksheets and create hyperlink
except that it will also include a "hidden" worksheet "Score".
How can I exclude this worksheet from being shown?
TIA
Shaz
Sub CreateLinks()
'Set visible area of cells where links will be placed
Set MyR = Range("k2:k100")
MyR.Clear
cnt = Worksheets.Count
x = 0
While x < cnt
For Each c In MyR.Cells
x = x + 1
c.Select
If x > cnt Then Exit Sub
shName = Worksheets(x).Name
ActiveSheet.Hyperlinks.Add Selection, "", shName &
"!A1"
c = shName
Next
Wend
Set MyR = Nothing
End Sub
The following macro will list all the worksheets and create hyperlink
except that it will also include a "hidden" worksheet "Score".
How can I exclude this worksheet from being shown?
TIA
Shaz
Sub CreateLinks()
'Set visible area of cells where links will be placed
Set MyR = Range("k2:k100")
MyR.Clear
cnt = Worksheets.Count
x = 0
While x < cnt
For Each c In MyR.Cells
x = x + 1
c.Select
If x > cnt Then Exit Sub
shName = Worksheets(x).Name
ActiveSheet.Hyperlinks.Add Selection, "", shName &
"!A1"
c = shName
Next
Wend
Set MyR = Nothing
End Sub