
Option Explicit
Sub crea_iperlinko(): Dim j As Integer, sh As Worksheet: For Each sh In ThisWorkbook.Sheets: Sheets("foglio3").Cells(j + 1, 1).Hyperlinks.Add Anchor:=Sheets("foglio3").Cells(j + 1, 1), Address:="", SubAddress:=sh.Name & "!$A$1", TextToDisplay:=sh.Name: j = j + 1: Next: Sheets("foglio3").Cells(j, 1).Clear: End Sub
sub rinomina_fogli
dim j as integer, sh as worksheet
for each sh in thisworkbook.sheets
j = j +1
sh.name = "Nuovo foglio " & j
next
end sub |
Option Explicit
Sub Nomesub()
Dim wb As Workbook
Dim ws As Worksheet
Dim strNome As String
Set wb = ThisWorkbook
For Each ws In wb.Worksheets
With ws
strNome = .Range("U1")
.Name = strNome
End With
Next ws
Set wb = Nothing
End Sub
|
Option Explicit
Sub riassumimelo()
Dim i As Integer, sh As Worksheet
i = 1
Sheets("Tabella").Range("A:A").Clear
For Each sh In ThisWorkbook.Sheets
If sh.Name <> "Tabella" Then
Sheets("Tabella").Cells(i, 1).Hyperlinks.Add Anchor:=Sheets("Tabella").Cells(i, 1), Address:="", SubAddress:=sh.Name & "!$A$1", TextToDisplay:=sh.Name
i = i + 1
End If
Next
End Sub
|
Option Explicit
Sub trova()
Dim sh As Worksheet, c As Object
For Each sh In ThisWorkbook.Sheets
Set c = sh.Cells.Find("testo da cercare", lookat:=xlPart)
If Not c Is Nothing Then sh.Select: c.Select: Exit For
Next
End Sub |
