Worksheet name as a hyperlink

N

nh1234

Hi,

I have an excel spreadsheet that has a button with VB code that copies the
worksheet and prompts the user to name the worksheet. This is the code:

Private Sub Copy_Worksheet_Click()
Dim result As String
ActiveWorkbook.Worksheets(1).Copy After:=Worksheets(Worksheets.Count)
result = InputBox("Enter a sheet name(unless you want the generic name).")
If result <> "" Then
ActiveSheet.Name = result
End If
End Sub

Is there a way to add additional code to list the worksheet name as a
hyperlink to a separate worksheet. I'm trying to make a table of contents.

Any help would be appreciated.

Thanks
 

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