Hyperlink --- misswritten....

J

John Wirt

This is getting out of hand but this code works:

For Each Wsh In Sheets
strWshName = Wsh.Name
If strWshName <> "List of Worksheets" Then
I = I + 1
RA = Replace("B" & Str(I), " ", "")
Set CurCell = Range(RA)
strAddress = "'" & strWshName & "'!A1"
strAddress = Replace(strAddress, " ", "")
ActiveSheet.Hyperlinks.Add _
Anchor:=CurCell, _
Address:="", _
SubAddress:=strAddress, _
TextToDisplay:=strWshName
With CurCell
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlCenter
.WrapText = False
.Font.Name = "Arial"
.Font.FontStyle = "Regular"
.Font.Size = 10
.Font.ColorIndex = xlAutomatic
End With
End If
Next Wsh

If one posts code it should be correct.

John Wirt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top