Hiperlink

BATMAN_PT

New Member
Joined
Apr 8, 2011
Messages
1
I have a problem using the macro bellow. I want do create a macro to count and list all name of existing worksheets in the workbook and creat hiperlinks to the repective worksheets.

CAN SOMEBODY HELP ME



Sub listar_folhas()
Set folhas = Application.Worksheets
num_folhas = folhas.Count
Range("A1").Value = num_folhas & "NUMERO DE FOLHAS"
linha = 2
Dim nome_folha As String

For a = 1 To num_folhas
nome_folha = folhas(a).Name
Range("A" & linha).Select
ActiveCell.Value = nome_folha
ActiveCell.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:="'nome_folhas'!A1", TextToDisplay:=nome_folha
linha = linha + 1


Next a
End Sub
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Forum statistics

Threads
1,224,508
Messages
6,179,189
Members
452,893
Latest member
denay

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top